Josh Boyer writes:

> +     status = of_get_property(device, "status", NULL);
> +     if (status == NULL)
> +             return 1;
> +
> +     if (!strcmp(status, "okay") || !strcmp(status, "ok"))

It would probably be good to defend against the possibility that the
property isn't null-terminated (for example if its length is zero).

Paul.
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to