···13591359 /* let kernel drivers try to (re)bind to the interface */13601360 case USBDEVFS_CONNECT:13611361 usb_unlock_device(ps->dev);13621362- bus_rescan_devices(intf->dev.bus);13621362+ retval = bus_rescan_devices(intf->dev.bus);13631363 usb_lock_device(ps->dev);13641364 break;13651365
+7-3
drivers/usb/core/driver.c
···4949 u32 idVendor = 0;5050 u32 idProduct = 0;5151 int fields = 0;5252+ int retval = 0;52535354 fields = sscanf(buf, "%x %x", &idVendor, &idProduct);5455 if (fields < 2)···6968 spin_unlock(&usb_drv->dynids.lock);70697170 if (get_driver(driver)) {7272- driver_attach(driver);7171+ retval = driver_attach(driver);7372 put_driver(driver);7473 }75747575+ if (retval)7676+ return retval;7677 return count;7778}7879static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);···294291{295292 struct device *dev = &iface->dev;296293 struct usb_device *udev = interface_to_usbdev(iface);294294+ int retval = 0;297295298296 if (dev->driver)299297 return -EBUSY;···312308 * the future device_add() bind it, bypassing probe()313309 */314310 if (device_is_registered(dev))315315- device_bind_driver(dev);311311+ retval = device_bind_driver(dev);316312317317- return 0;313313+ return retval;318314}319315EXPORT_SYMBOL(usb_driver_claim_interface);320316