U-Boot: bail out in of_init() if no FDT passed
This commit is contained in:
@@ -56,6 +56,9 @@ static int fdt2of(int err)
|
|||||||
status_t
|
status_t
|
||||||
of_init(int (*openFirmwareEntry)(void *))
|
of_init(int (*openFirmwareEntry)(void *))
|
||||||
{
|
{
|
||||||
|
if (gFDT == NULL)
|
||||||
|
return OF_FAILED;
|
||||||
|
|
||||||
gChosen = fdt2of(fdt_path_offset(gFDT, "/chosen"));
|
gChosen = fdt2of(fdt_path_offset(gFDT, "/chosen"));
|
||||||
|
|
||||||
if (gChosen == OF_FAILED)
|
if (gChosen == OF_FAILED)
|
||||||
|
|||||||
Reference in New Issue
Block a user