diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2010-09-11 01:39:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-13 23:02:52 -0400 |
commit | 7dbfdc2390afc4e244817ab26d5a1b987b0c0669 (patch) | |
tree | d423a8cf8dfab4c705a7d6f3ad4e41b5e76b1ca8 | |
parent | d81e27cf4e2a5050245f9962539292ea2c9e2206 (diff) |
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: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/usb/cx82310_eth.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c index 6fbe03276b27..4d451789ea7c 100644 --- a/drivers/net/usb/cx82310_eth.c +++ b/drivers/net/usb/cx82310_eth.c | |||
@@ -138,11 +138,9 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf) | |||
138 | struct usb_device *udev = dev->udev; | 138 | struct usb_device *udev = dev->udev; |
139 | 139 | ||
140 | /* avoid ADSL modems - continue only if iProduct is "USB NET CARD" */ | 140 | /* avoid ADSL modems - continue only if iProduct is "USB NET CARD" */ |
141 | if (udev->descriptor.iProduct && | 141 | if (usb_string(udev, udev->descriptor.iProduct, buf, sizeof(buf)) > 0 |
142 | usb_string(udev, udev->descriptor.iProduct, buf, sizeof(buf)) && | 142 | && strcmp(buf, "USB NET CARD")) { |
143 | strcmp(buf, "USB NET CARD")) { | 143 | dev_info(&udev->dev, "ignoring: probably an ADSL modem\n"); |
144 | dev_err(&udev->dev, | ||
145 | "probably an ADSL modem, use cxacru driver instead\n"); | ||
146 | return -ENODEV; | 144 | return -ENODEV; |
147 | } | 145 | } |
148 | 146 | ||