+ i2o-handle-a-few-sysfs-errors.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     I2O: handle a few sysfs errors

has been added to the -mm tree.  Its filename is

     i2o-handle-a-few-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: I2O: handle a few sysfs errors
From: Jeff Garzik <jeff@xxxxxxxxxx>

Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Markus Lidel <Markus.Lidel@xxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/message/i2o/bus-osm.c  |   12 ++++++++++--
 drivers/message/i2o/exec-osm.c |   17 ++++++++++++++---
 2 files changed, 24 insertions(+), 5 deletions(-)

diff -puN drivers/message/i2o/bus-osm.c~i2o-handle-a-few-sysfs-errors drivers/message/i2o/bus-osm.c
--- a/drivers/message/i2o/bus-osm.c~i2o-handle-a-few-sysfs-errors
+++ a/drivers/message/i2o/bus-osm.c
@@ -80,18 +80,26 @@ static DEVICE_ATTR(scan, S_IWUSR, NULL, 
  *	@dev: device to verify if it is a I2O Bus Adapter device
  *
  *	Because we want all Bus Adapters always return 0.
+ *	Except when we fail.  Then we are sad.
  *
- *	Returns 0.
+ *	Returns 0, except when we fail to excel.
  */
 static int i2o_bus_probe(struct device *dev)
 {
 	struct i2o_device *i2o_dev = to_i2o_device(get_device(dev));
+	int rc;
 
-	device_create_file(dev, &dev_attr_scan);
+	rc = device_create_file(dev, &dev_attr_scan);
+	if (rc)
+		goto err_out;
 
 	osm_info("device added (TID: %03x)\n", i2o_dev->lct_data.tid);
 
 	return 0;
+
+err_out:
+	put_device(dev);
+	return rc;
 };
 
 /**
diff -puN drivers/message/i2o/exec-osm.c~i2o-handle-a-few-sysfs-errors drivers/message/i2o/exec-osm.c
--- a/drivers/message/i2o/exec-osm.c~i2o-handle-a-few-sysfs-errors
+++ a/drivers/message/i2o/exec-osm.c
@@ -325,13 +325,24 @@ static DEVICE_ATTR(product_id, S_IRUGO, 
 static int i2o_exec_probe(struct device *dev)
 {
 	struct i2o_device *i2o_dev = to_i2o_device(dev);
+	int rc;
 
-	i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff);
+	rc = i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff);
+	if (rc) goto err_out;
 
-	device_create_file(dev, &dev_attr_vendor_id);
-	device_create_file(dev, &dev_attr_product_id);
+	rc = device_create_file(dev, &dev_attr_vendor_id);
+	if (rc) goto err_evtreg;
+	rc = device_create_file(dev, &dev_attr_product_id);
+	if (rc) goto err_vid;
 
 	return 0;
+
+err_vid:
+	device_remove_file(dev, &dev_attr_vendor_id);
+err_evtreg:
+	i2o_event_register(to_i2o_device(dev), &i2o_exec_driver, 0, 0);
+err_out:
+	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
cpufreq-handle-sysfs-errors.patch
fs-partitions-check-add-sysfs-error-handling.patch
drm-fix-error-returns-sysfs-error-handling.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
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
drivers-dma-handle-sysfs-errors.patch
atm-firestream-handle-thrown-error.patch
r8169-driver-corega-support-patch.patch
git-pciseg.patch
watchdog-itco_wdt-fix-bug-related-to-gcc-uninit-warning.patch
airo-suspend-fix.patch
tpm-fix-error-handling.patch
x86-microcode-handle-sysfs-error.patch
firmware-dell_rbu-handle-sysfs-errors.patch
firmware-dcdbas-fix-bug-in-error-cleanup.patch
ipmi-handle-sysfs-errors.patch
drivers-ide-fix-error-return-bugs-interface.patch
eisa-handle-sysfs-errors.patch
firmware-efivars-handle-error.patch
isdn-several-minor-fixes.patch
git-gccbug.patch
drivers-led-handle-sysfs-errors.patch
drivers-mca-handle-sysfs-errors.patch
video-ov511stv680-handle-sysfs-errors.patch
i2o-handle-a-few-sysfs-errors.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux