diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-28 20:43:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 02:43:53 +0200 |
commit | b19441af185559118e8247382ea4f2f76ebffc6d (patch) | |
tree | 5b687d2a0052b38fa5d32abeec75374b4aa8830e /drivers/pci/pci-driver.c | |
parent | PCI Hotplug: fix __must_check warnings (diff) | |
download | linux-b19441af185559118e8247382ea4f2f76ebffc6d.tar.xz linux-b19441af185559118e8247382ea4f2f76ebffc6d.zip |
PCI: fix __must_check warnings
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index d8ace1f90dd2..309629e03bae 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -56,6 +56,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) subdevice=PCI_ANY_ID, class=0, class_mask=0; unsigned long driver_data=0; int fields=0; + int retval = 0; fields = sscanf(buf, "%x %x %x %x %x %x %lux", &vendor, &device, &subvendor, &subdevice, @@ -82,10 +83,12 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) spin_unlock(&pdrv->dynids.lock); if (get_driver(&pdrv->driver)) { - driver_attach(&pdrv->driver); + retval = driver_attach(&pdrv->driver); put_driver(&pdrv->driver); } + if (retval) + return retval; return count; } static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id); |