From: Colin King <hidden> Date: 2021-06-08 15:23:12
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/usb/asix_devices.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Colin King <hidden> Date: 2021-06-08 15:23:23
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/usb/ax88172a.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
On Tue, Jun 08, 2021 at 04:22:48PM +0100, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/usb/asix_devices.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
On Tue, Jun 08, 2021 at 04:22:49PM +0100, Colin King wrote:
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return")
Here is wrong Fixes tag. This assignment was bogus before this patch.
quoted hunk
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/usb/ax88172a.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Dan Carpenter <hidden> Date: 2021-06-09 09:28:36
On Tue, Jun 08, 2021 at 04:22:48PM +0100, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/usb/asix_devices.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Colin Ian King <hidden> Date: 2021-06-09 09:51:16
On 08/06/2021 19:11, Oleksij Rempel wrote:
On Tue, Jun 08, 2021 at 04:22:49PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return")
Here is wrong Fixes tag. This assignment was bogus before this patch.
I'm not sure that's correct, that commit has the following change in it:
On Wed, Jun 09, 2021 at 10:51:09AM +0100, Colin Ian King wrote:
quoted hunk
On 08/06/2021 19:11, Oleksij Rempel wrote:
quoted
On Tue, Jun 08, 2021 at 04:22:49PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The comparison of the u16 priv->phy_addr < 0 is always false because
phy_addr is unsigned. Fix this by assigning the return from the call
to function asix_read_phy_addr to int ret and using this for the
less than zero error check comparison.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return")
Here is wrong Fixes tag. This assignment was bogus before this patch.
I'm not sure that's correct, that commit has the following change in it: