Commit 7dbfdc23 authored by Ondrej Zary's avatar Ondrej Zary Committed by David S. Miller

cx82310_eth: check usb_string() return value for error

Fix that usb_string() return value is not checked for error (negative value).
Also change the ignore message a bit and lower its level to info.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d81e27cf
...@@ -138,11 +138,9 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -138,11 +138,9 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
struct usb_device *udev = dev->udev; struct usb_device *udev = dev->udev;
/* avoid ADSL modems - continue only if iProduct is "USB NET CARD" */ /* avoid ADSL modems - continue only if iProduct is "USB NET CARD" */
if (udev->descriptor.iProduct && if (usb_string(udev, udev->descriptor.iProduct, buf, sizeof(buf)) > 0
usb_string(udev, udev->descriptor.iProduct, buf, sizeof(buf)) && && strcmp(buf, "USB NET CARD")) {
strcmp(buf, "USB NET CARD")) { dev_info(&udev->dev, "ignoring: probably an ADSL modem\n");
dev_err(&udev->dev,
"probably an ADSL modem, use cxacru driver instead\n");
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment