Thorsten Blum <[email protected]> writes:

> fdt_node_offset_by_prop_value() returns a negative error code on
> failure - fix the check accordingly.
>
> Fixes: 2a2c74b2efcb ("IBM Akebono: Add the Akebono platform")
> Signed-off-by: Thorsten Blum <[email protected]>

Looks good to me. Please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <[email protected]>

> ---
>  arch/powerpc/boot/treeboot-akebono.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/boot/treeboot-akebono.c 
> b/arch/powerpc/boot/treeboot-akebono.c
> index e3cc2599869c..1b529037480f 100644
> --- a/arch/powerpc/boot/treeboot-akebono.c
> +++ b/arch/powerpc/boot/treeboot-akebono.c
> @@ -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))

Reply via email to