diff options
Diffstat (limited to 'drivers/message/i2o/bus-osm.c')
-rw-r--r-- | drivers/message/i2o/bus-osm.c | 12 |
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); | |||
80 | * @dev: device to verify if it is a I2O Bus Adapter device | 80 | * @dev: device to verify if it is a I2O Bus Adapter device |
81 | * | 81 | * |
82 | * Because we want all Bus Adapters always return 0. | 82 | * Because we want all Bus Adapters always return 0. |
83 | * Except when we fail. Then we are sad. | ||
83 | * | 84 | * |
84 | * Returns 0. | 85 | * Returns 0, except when we fail to excel. |
85 | */ | 86 | */ |
86 | static int i2o_bus_probe(struct device *dev) | 87 | static int i2o_bus_probe(struct device *dev) |
87 | { | 88 | { |
88 | struct i2o_device *i2o_dev = to_i2o_device(get_device(dev)); | 89 | struct i2o_device *i2o_dev = to_i2o_device(get_device(dev)); |
90 | int rc; | ||
89 | 91 | ||
90 | device_create_file(dev, &dev_attr_scan); | 92 | rc = device_create_file(dev, &dev_attr_scan); |
93 | if (rc) | ||
94 | goto err_out; | ||
91 | 95 | ||
92 | osm_info("device added (TID: %03x)\n", i2o_dev->lct_data.tid); | 96 | osm_info("device added (TID: %03x)\n", i2o_dev->lct_data.tid); |
93 | 97 | ||
94 | return 0; | 98 | return 0; |
99 | |||
100 | err_out: | ||
101 | put_device(dev); | ||
102 | return rc; | ||
95 | }; | 103 | }; |
96 | 104 | ||
97 | /** | 105 | /** |