Skip to content

Commit

Permalink
net: usb: asix_devices: fix missing return code check on call to asix…
Browse files Browse the repository at this point in the history
…_write_medium_mode

The call to asix_write_medium_mode is not updating the return code ret
and yet ret is being checked for an error. Fix this by assigning ret to
the return code from the call asix_write_medium_mode.

Detected by CoverityScan, CID#1357148 ("Logically Dead Code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Mar 1, 2017
1 parent 0bf09c3 commit 4f3de46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/asix_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static int ax88772_reset(struct usbnet *dev)
if (ret < 0)
goto out;

asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT, 0);
ret = asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT, 0);
if (ret < 0)
goto out;

Expand Down

0 comments on commit 4f3de46

Please sign in to comment.