summaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/bus-osm.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-17 00:10:22 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 08:18:46 -0700
commit6b5f29675c6a1041aefc147271508bd56cf2b761 (patch)
tree097426aac84e322df5188954b435a86281bbb40a /drivers/message/i2o/bus-osm.c
parent12fda16814bba05a84a49a1da25a069d6c249758 (diff)
downloadtalos-obmc-linux-6b5f29675c6a1041aefc147271508bd56cf2b761.tar.gz
talos-obmc-linux-6b5f29675c6a1041aefc147271508bd56cf2b761.zip
[PATCH] I2O: handle a few sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/bus-osm.c')
-rw-r--r--drivers/message/i2o/bus-osm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/message/i2o/bus-osm.c b/drivers/message/i2o/bus-osm.c
index ac06f10c54ec..d96c687aee93 100644
--- a/drivers/message/i2o/bus-osm.c
+++ b/drivers/message/i2o/bus-osm.c
@@ -80,18 +80,26 @@ static DEVICE_ATTR(scan, S_IWUSR, NULL, i2o_bus_store_scan);
* @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;
};
/**
OpenPOWER on IntegriCloud