The patch titled USB/gadget/net2280: handle sysfs errors has been added to the -mm tree. Its filename is usb-gadget-net2280-handle-sysfs-errors.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: USB/gadget/net2280: handle sysfs errors From: Jeff Garzik <jeff@xxxxxxxxxx> Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/usb/gadget/net2280.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff -puN drivers/usb/gadget/net2280.c~usb-gadget-net2280-handle-sysfs-errors drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c~usb-gadget-net2280-handle-sysfs-errors +++ a/drivers/usb/gadget/net2280.c @@ -2044,8 +2044,10 @@ int usb_gadget_register_driver (struct u return retval; } - device_create_file (&dev->pdev->dev, &dev_attr_function); - device_create_file (&dev->pdev->dev, &dev_attr_queues); + retval = device_create_file (&dev->pdev->dev, &dev_attr_function); + if (retval) goto err_unbind; + retval = device_create_file (&dev->pdev->dev, &dev_attr_queues); + if (retval) goto err_func; /* ... then enable host detection and ep0; and we're ready * for set_configuration as well as eventual disconnect. @@ -2060,6 +2062,14 @@ int usb_gadget_register_driver (struct u /* pci writes may still be posted */ return 0; + +err_func: + device_remove_file (&dev->pdev->dev, &dev_attr_function); +err_unbind: + driver->unbind (&dev->gadget); + dev->gadget.dev.driver = NULL; + dev->driver = NULL; + return retval; } EXPORT_SYMBOL (usb_gadget_register_driver); @@ -2974,8 +2984,10 @@ static int net2280_probe (struct pci_dev : "disabled"); the_controller = dev; - device_register (&dev->gadget.dev); - device_create_file (&pdev->dev, &dev_attr_registers); + retval = device_register (&dev->gadget.dev); + if (retval) goto done; + retval = device_create_file (&pdev->dev, &dev_attr_registers); + if (retval) goto done; return 0; _ Patches currently in -mm which might be from jeff@xxxxxxxxxx are origin.patch fix-up-a-multitude-of-acpi-compiler-warnings-on-x86_64.patch cpufreq-handle-sysfs-errors.patch drm-fix-error-returns-sysfs-error-handling.patch git-dvb.patch drivers-media-video-handle-sysfs-errors.patch i2c-buses-scx200_acb-handle-pci-errors.patch input-handle-sysfs-errors.patch input-drivers-handle-sysfs-errors.patch git-libata-all.patch ata-must-depend-on-block.patch via-pata-controller-xfer-fixes.patch ahci-ati-sb600-sata-support-for-various-modes.patch drivers-mmcmisc-handle-pci-errors-on-resume.patch git-mtd.patch git-netdev-all.patch libphy-dont-do-that.patch update-smc91x-driver-with-arm-versatile-board-info.patch 8139too-force-media-setting-fix.patch tulip-fix-shutdown-dma-irq-race.patch drivers-dma-handle-sysfs-errors.patch atm-firestream-handle-thrown-error.patch wan-pc300-handle-propagate-minor-errors.patch pcmcia-handle-sysfs-pci-errors.patch r8169-driver-corega-support-patch.patch git-pciseg.patch scsi-minor-bug-fixes-and-cleanups.patch mpt-fusion-handle-pci-layer-error-on-resume.patch git-watchdog.patch airo-suspend-fix.patch drivers-led-handle-sysfs-errors.patch i2o-handle-a-few-sysfs-errors.patch fs-partitions-check-add-sysfs-error-handling.patch rtc-fix-printk-of-64-bit-res-on-32-bit-platform.patch i2o-more-error-checking.patch pnp-handle-sysfs-errors.patch rtc-handle-sysfs-errors.patch sound-oss-emu10k1-handle-userspace-copy-errors.patch scsi-aha1740-handle-scsi-api-errors.patch scsi-qla2xxx-handle-sysfs-errors.patch serial-handle-pci_enable_device-failure-upon-resume.patch spi-improve-sysfs-compiler-complaint-handling.patch usb-gadget-net2280-handle-sysfs-errors.patch net-atm-handle-sysfs-errors.patch net-bluetooth-handle-sysfs-errors.patch isdn-fix-drivers-by-handling-errors-thrown-by-readstat.patch isdn-check-for-userspace-copy-faults.patch atyfb-rivafb-minor-fixes.patch md-conditionalize-some-code.patch git-gccbug.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html