diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-28 22:43:25 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 22:58:57 +0400 |
commit | 1b21d5e166e104f8914441ef52e2cd50ce65b479 (patch) | |
tree | e3139ee35d16be051d3dd01688bc29ec2afc7315 /drivers/usb/core/driver.c | |
parent | 592fbbe4bc339399d363dd55f0391e0623400706 (diff) | |
download | linux-1b21d5e166e104f8914441ef52e2cd50ce65b479.tar.xz |
USB: fix __must_check warnings in drivers/usb/core/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 0d063c8ca4b4..b10463244413 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -49,6 +49,7 @@ static ssize_t store_new_id(struct device_driver *driver, u32 idVendor = 0; u32 idProduct = 0; int fields = 0; + int retval = 0; fields = sscanf(buf, "%x %x", &idVendor, &idProduct); if (fields < 2) @@ -68,10 +69,12 @@ static ssize_t store_new_id(struct device_driver *driver, spin_unlock(&usb_drv->dynids.lock); if (get_driver(driver)) { - driver_attach(driver); + retval = driver_attach(driver); put_driver(driver); } + if (retval) + return retval; return count; } static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id); @@ -291,6 +294,7 @@ int usb_driver_claim_interface(struct usb_driver *driver, { struct device *dev = &iface->dev; struct usb_device *udev = interface_to_usbdev(iface); + int retval = 0; if (dev->driver) return -EBUSY; @@ -308,9 +312,9 @@ int usb_driver_claim_interface(struct usb_driver *driver, * the future device_add() bind it, bypassing probe() */ if (device_is_registered(dev)) - device_bind_driver(dev); + retval = device_bind_driver(dev); - return 0; + return retval; } EXPORT_SYMBOL(usb_driver_claim_interface); |