The patch titled drivers/dma: handle sysfs errors has been added to the -mm tree. Its filename is drivers-dma-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: drivers/dma: handle sysfs errors From: Jeff Garzik <jeff@xxxxxxxxxx> Where is a MAINTAINER entry for drivers/dma, or even an email address in the code? Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx> Cc: Chris Leech <christopher.leech@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/dma/dmaengine.c | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff -puN drivers/dma/dmaengine.c~drivers-dma-handle-sysfs-errors drivers/dma/dmaengine.c --- a/drivers/dma/dmaengine.c~drivers-dma-handle-sysfs-errors +++ a/drivers/dma/dmaengine.c @@ -312,7 +312,7 @@ void dma_async_client_chan_request(struc int dma_async_device_register(struct dma_device *device) { static int id; - int chancnt = 0; + int chancnt = 0, rc; struct dma_chan* chan; if (!device) @@ -334,8 +334,15 @@ int dma_async_device_register(struct dma snprintf(chan->class_dev.class_id, BUS_ID_SIZE, "dma%dchan%d", device->dev_id, chan->chan_id); + rc = class_device_register(&chan->class_dev); + if (rc) { + chancnt--; + free_percpu(chan->local); + chan->local = NULL; + goto err_out; + } + kref_get(&device->refcount); - class_device_register(&chan->class_dev); } mutex_lock(&dma_list_mutex); @@ -345,6 +352,17 @@ int dma_async_device_register(struct dma dma_chans_rebalance(); return 0; + +err_out: + list_for_each_entry(chan, &device->channels, device_node) { + if (chan->local == NULL) + continue; + kref_put(&device->refcount, dma_async_device_cleanup); + class_device_unregister(&chan->class_dev); + chancnt--; + free_percpu(chan->local); + } + return rc; } /** _ 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 fs-partitions-check-add-sysfs-error-handling.patch drm-fix-error-returns-sysfs-error-handling.patch git-libata-all.patch ata-must-depend-on-block.patch pci_module_init-conversion-for-pata_pdc2027x.patch libata-return-sense-data-in-hdio_drive_cmd-ioctl.patch libata-return-sense-data-in-hdio_drive_cmd-ioctl-tidy.patch via-pata-controller-xfer-fixes.patch ahci-ati-sb600-sata-support-for-various-modes.patch git-mtd.patch git-netdev-all.patch libphy-dont-do-that.patch update-smc91x-driver-with-arm-versatile-board-info.patch b44-fix-eeprom-endianess-issue.patch forcedeth-power-management-support.patch forcedeth-power-management-support-tidy.patch remove-unnecessary-check-in-drivers-net-depcac.patch 8139too-force-media-setting-fix.patch ibmveth-irq-fix.patch tulip-fix-shutdown-dma-irq-race.patch r8169-driver-corega-support-patch.patch git-pciseg.patch airo-suspend-fix.patch tpm-fix-error-handling.patch x86-microcode-handle-sysfs-error.patch git-gccbug.patch input-handle-sysfs-errors.patch firmware-dell_rbu-handle-sysfs-errors.patch firmware-dcdbas-fix-bug-in-error-cleanup.patch drivers-dma-handle-sysfs-errors.patch cpufreq-handle-sysfs-errors.patch ipmi-handle-sysfs-errors.patch atm-firestream-handle-thrown-error.patch watchdog-itco_wdt-fix-bug-related-to-gcc-uninit-warning.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