mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
powerpc/boot: Fix treeboot-akebono CPU node lookup check
fdt_node_offset_by_prop_value() returns a negative error code on
failure - fix the check accordingly.
Fixes: 2a2c74b2ef ("IBM Akebono: Add the Akebono platform")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260702211554.56923-6-thorsten.blum@linux.dev
This commit is contained in:
parent
43863f6575
commit
b24fc8278b
|
|
@ -146,7 +146,7 @@ void platform_init(char *userdata)
|
|||
|
||||
node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
|
||||
"cpu", sizeof("cpu"));
|
||||
if (!node)
|
||||
if (node < 0)
|
||||
fatal("Cannot find cpu node\n");
|
||||
timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size);
|
||||
if (timebase && (size == 4))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user