mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
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:
parent
2186f01c75
commit
c50b9bb30c
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue