net: usb: aqc111: debug info before sanitation
commit d3faab9b5a6a0477d69c38bd11c43aa5e936f929 upstream. 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: 405b0d610745 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0fcfc93576
commit
65e20c5d99
@@ -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