提交 7dbe5849 编写于 作者: L Laurentiu Tudor 提交者: Grant Likely

of: make sure of_alias is initialized before accessing it

Simply swap of_alias and of_chosen initialization so
that of_alias ends up read first. This must be done
because it is accessed couple of lines below when
trying to initialize the of_stdout using the alias
based legacy method.

[Fixes a752ee56 - tty: Update hypervisor tty drivers to
use core stdout parsing code]
Signed-off-by: NLaurentiu Tudor <Laurentiu.Tudor@freescale.com>
[glikely: Don't move the 'if (!of_aliases)' test]
Signed-off-by: NGrant Likely <grant.likely@linaro.org>
上级 b9c74fd7
......@@ -1859,6 +1859,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
{
struct property *pp;
of_aliases = of_find_node_by_path("/aliases");
of_chosen = of_find_node_by_path("/chosen");
if (of_chosen == NULL)
of_chosen = of_find_node_by_path("/chosen@0");
......@@ -1874,7 +1875,6 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
of_stdout = of_find_node_by_path(name);
}
of_aliases = of_find_node_by_path("/aliases");
if (!of_aliases)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册