net: usb: aqc111: debug info before sanitation
If we sanitize error returns, the debug statements need
to come before that so that we don't lose information.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Fixes: 405b0d6107 ("net: usb: aqc111: fix error handling of usbnet read calls")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
27eab4c644
commit
d3faab9b5a
@@ -31,11 +31,11 @@ static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value,
|
||||
USB_RECIP_DEVICE, value, index, data, size);
|
||||
|
||||
if (unlikely(ret < size)) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
netdev_warn(dev->net,
|
||||
"Failed to read(0x%x) reg index 0x%04x: %d\n",
|
||||
cmd, index, ret);
|
||||
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -50,11 +50,11 @@ static int aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value,
|
||||
USB_RECIP_DEVICE, value, index, data, size);
|
||||
|
||||
if (unlikely(ret < size)) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
netdev_warn(dev->net,
|
||||
"Failed to read(0x%x) reg index 0x%04x: %d\n",
|
||||
cmd, index, ret);
|
||||
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user