Re: [PATCH] lan78xx: Fix ladv/radv error handling in lan78xx_link_reset()

From: David Miller
Date: Sun Sep 06 2015 - 22:47:54 EST


From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Fri, 4 Sep 2015 12:47:28 +0200

> 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@xxxxxxxxxxxxxx>

Applied, thanks.