diff options
Diffstat (limited to 'drivers/message/i2o/i2o_scsi.c')
-rw-r--r-- | drivers/message/i2o/i2o_scsi.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c index 6ebf38213f9f..1045c8a518bb 100644 --- a/drivers/message/i2o/i2o_scsi.c +++ b/drivers/message/i2o/i2o_scsi.c | |||
@@ -220,7 +220,7 @@ static int i2o_scsi_probe(struct device *dev) | |||
220 | u32 id = -1; | 220 | u32 id = -1; |
221 | u64 lun = -1; | 221 | u64 lun = -1; |
222 | int channel = -1; | 222 | int channel = -1; |
223 | int i; | 223 | int i, rc; |
224 | 224 | ||
225 | i2o_shost = i2o_scsi_get_host(c); | 225 | i2o_shost = i2o_scsi_get_host(c); |
226 | if (!i2o_shost) | 226 | if (!i2o_shost) |
@@ -304,14 +304,20 @@ static int i2o_scsi_probe(struct device *dev) | |||
304 | return PTR_ERR(scsi_dev); | 304 | return PTR_ERR(scsi_dev); |
305 | } | 305 | } |
306 | 306 | ||
307 | sysfs_create_link(&i2o_dev->device.kobj, &scsi_dev->sdev_gendev.kobj, | 307 | rc = sysfs_create_link(&i2o_dev->device.kobj, |
308 | "scsi"); | 308 | &scsi_dev->sdev_gendev.kobj, "scsi"); |
309 | if (rc) | ||
310 | goto err; | ||
309 | 311 | ||
310 | osm_info("device added (TID: %03x) channel: %d, id: %d, lun: %ld\n", | 312 | osm_info("device added (TID: %03x) channel: %d, id: %d, lun: %ld\n", |
311 | i2o_dev->lct_data.tid, channel, le32_to_cpu(id), | 313 | i2o_dev->lct_data.tid, channel, le32_to_cpu(id), |
312 | (long unsigned int)le64_to_cpu(lun)); | 314 | (long unsigned int)le64_to_cpu(lun)); |
313 | 315 | ||
314 | return 0; | 316 | return 0; |
317 | |||
318 | err: | ||
319 | scsi_remove_device(scsi_dev); | ||
320 | return rc; | ||
315 | }; | 321 | }; |
316 | 322 | ||
317 | static const char *i2o_scsi_info(struct Scsi_Host *SChost) | 323 | static const char *i2o_scsi_info(struct Scsi_Host *SChost) |
@@ -405,8 +411,7 @@ static void i2o_scsi_notify_device_add(struct i2o_device *i2o_dev) | |||
405 | }; | 411 | }; |
406 | 412 | ||
407 | /** | 413 | /** |
408 | * i2o_scsi_notify_device_remove - Retrieve notifications of removed | 414 | * i2o_scsi_notify_device_remove - Retrieve notifications of removed devices |
409 | * devices | ||
410 | * @i2o_dev: the I2O device which was removed | 415 | * @i2o_dev: the I2O device which was removed |
411 | * | 416 | * |
412 | * If a I2O device is removed, we catch the notification to remove the | 417 | * If a I2O device is removed, we catch the notification to remove the |
@@ -426,8 +431,7 @@ static void i2o_scsi_notify_device_remove(struct i2o_device *i2o_dev) | |||
426 | }; | 431 | }; |
427 | 432 | ||
428 | /** | 433 | /** |
429 | * i2o_scsi_notify_controller_add - Retrieve notifications of added | 434 | * i2o_scsi_notify_controller_add - Retrieve notifications of added controllers |
430 | * controllers | ||
431 | * @c: the controller which was added | 435 | * @c: the controller which was added |
432 | * | 436 | * |
433 | * If a I2O controller is added, we catch the notification to add a | 437 | * If a I2O controller is added, we catch the notification to add a |
@@ -457,8 +461,7 @@ static void i2o_scsi_notify_controller_add(struct i2o_controller *c) | |||
457 | }; | 461 | }; |
458 | 462 | ||
459 | /** | 463 | /** |
460 | * i2o_scsi_notify_controller_remove - Retrieve notifications of removed | 464 | * i2o_scsi_notify_controller_remove - Retrieve notifications of removed controllers |
461 | * controllers | ||
462 | * @c: the controller which was removed | 465 | * @c: the controller which was removed |
463 | * | 466 | * |
464 | * If a I2O controller is removed, we catch the notification to remove the | 467 | * If a I2O controller is removed, we catch the notification to remove the |
@@ -745,7 +748,7 @@ static int i2o_scsi_abort(struct scsi_cmnd *SCpnt) | |||
745 | * @capacity: size in sectors | 748 | * @capacity: size in sectors |
746 | * @ip: geometry array | 749 | * @ip: geometry array |
747 | * | 750 | * |
748 | * This is anyones guess quite frankly. We use the same rules everyone | 751 | * This is anyone's guess quite frankly. We use the same rules everyone |
749 | * else appears to and hope. It seems to work. | 752 | * else appears to and hope. It seems to work. |
750 | */ | 753 | */ |
751 | 754 | ||