diff options
Diffstat (limited to 'drivers/message/i2o/exec-osm.c')
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 7bd4d85d0b42..91f95d172ca5 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -325,13 +325,24 @@ static DEVICE_ATTR(product_id, S_IRUGO, i2o_exec_show_product_id, NULL); | |||
325 | static int i2o_exec_probe(struct device *dev) | 325 | static int i2o_exec_probe(struct device *dev) |
326 | { | 326 | { |
327 | struct i2o_device *i2o_dev = to_i2o_device(dev); | 327 | struct i2o_device *i2o_dev = to_i2o_device(dev); |
328 | int rc; | ||
328 | 329 | ||
329 | i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff); | 330 | rc = i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff); |
331 | if (rc) goto err_out; | ||
330 | 332 | ||
331 | device_create_file(dev, &dev_attr_vendor_id); | 333 | rc = device_create_file(dev, &dev_attr_vendor_id); |
332 | device_create_file(dev, &dev_attr_product_id); | 334 | if (rc) goto err_evtreg; |
335 | rc = device_create_file(dev, &dev_attr_product_id); | ||
336 | if (rc) goto err_vid; | ||
333 | 337 | ||
334 | return 0; | 338 | return 0; |
339 | |||
340 | err_vid: | ||
341 | device_remove_file(dev, &dev_attr_vendor_id); | ||
342 | err_evtreg: | ||
343 | i2o_event_register(to_i2o_device(dev), &i2o_exec_driver, 0, 0); | ||
344 | err_out: | ||
345 | return rc; | ||
335 | }; | 346 | }; |
336 | 347 | ||
337 | /** | 348 | /** |