]> git.baikalelectronics.ru Git - kernel.git/commit
lan78xx: Fix ladv/radv error handling in lan78xx_link_reset()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 4 Sep 2015 10:47:28 +0000 (12:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Sep 2015 02:46:56 +0000 (19:46 -0700)
commit23ff4ea3a9be1ef5da36a3caa7f240e96b33fae1
treecadbf51449d9edbf1c0fd7e8b355bf697d7eff0c
parent18c13c1eccb483935c203db9ecc43ca27509bd6b
lan78xx: Fix ladv/radv error handling in lan78xx_link_reset()

net/usb/lan78xx.c: In function ‘lan78xx_link_reset’:
net/usb/lan78xx.c:1107: warning: comparison is always false due to limited range of data type
net/usb/lan78xx.c:1111: warning: comparison is always false due to limited range of data type

Assigning return values that can be negative error codes to "u16"
variables makes them positive, ignoring the errors.  Hence use "int"
instead.

Drop the "unlikely"s (unlikely considered harmful) and propagate the
actual error values instead of overriding them to -EIO while we're at
it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c