[PATCH] net/can: add driver for mscan family & mpc52xx_mscan

Wolfgang Grandegger wg at grandegger.com
Wed Nov 18 06:17:55 EST 2009


Wolfgang Grandegger wrote:
> Wolfram Sang wrote:
>> Hi Grant,
>>
>> Wolfgang commented on some points already, I will pick up the other remarks,
>> just one question:
>>
>>>> +       clk_src = of_get_property(np, "fsl,mscan-clk-src", NULL);
>>>> +       if (clk_src && strcmp(clk_src, "ip") == 0)
>>> Should protect against non-null.  strncmp() maybe?
>> "ip" is null-terminated, or what do you mean?
> 
> Imagine somebody defines:
> 
>   fsl,mscan-clk-src = <0xbaeee>;

Forget my comment. I will not harm in the above case. I was just worried
about non-null-teminated strings.

Wolfgang.


More information about the Linuxppc-dev mailing list