lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dsa: mv88e6xxx: Fix error handling in mv88e6xxx_set_port_state
On 04/16/2015 11:51 AM, Geert Uytterhoeven wrote:
> On Thu, Apr 16, 2015 at 3:46 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>> On 04/15/2015 10:12 PM, Guenter Roeck wrote:
>>>
>>> Return correct error code if _mv88e6xxx_reg_read returns an error.
>>>
>>> Fixes: facd95b2e0ec0 ("net: dsa: mv88e6xxx: Add Hardware bridging
>>> support")
>>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>
>>
>> I should have given proper credit.
>>
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>
>> For the curious, neither W=1, W=2, C-1, C=2, nor sparse report this problem,
>> at least not with gcc 4.9.1.
>
> Good old gcc 4.1.2 (which I still use for m68k builds, and won't retire anytime
> soon as it finds real bugs in every new kernel release) says:
>
> drivers/net/dsa/mv88e6xxx.c: In function ‘mv88e6xxx_set_port_state’:
> drivers/net/dsa/mv88e6xxx.c:905: warning: ‘ret’ may be used
> uninitialized in this function
>
> Even after your patch, as it missed one case (patch sent).
>

Grumble. So much for trusting tools :-(

Thanks for fixing this!

Guenter



\
 
 \ /
  Last update: 2015-04-17 04:41    [W:0.050 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site