aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2005-12-12 23:03:30 -0500
committerJody McIntyre <scjody@modernduck.com>2005-12-12 23:03:30 -0500
commitdc3edd5412341b02d84144ddfd5bf6ccaaeeb1ac (patch)
treedf739298b8c5ea5b3d10b41db3c42c43c77a0786 /drivers/ieee1394/sbp2.c
parent43863eba763e0c91e33e342ce5b7650fea594a53 (diff)
sbp2: did not clean up after scsi_add_device() failed
If scsi_add_device() at the end of sbp2_start_device() fails, e.g. due to transport errors during SCSI inquiry, sbp2 needs to log out of the device and release all associated resources. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 372a7726063c..5b9d03e93514 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -960,6 +960,8 @@ alloc_fail:
960 error = scsi_add_device(scsi_id->scsi_host, 0, scsi_id->ud->id, 0); 960 error = scsi_add_device(scsi_id->scsi_host, 0, scsi_id->ud->id, 0);
961 if (error) { 961 if (error) {
962 SBP2_ERR("scsi_add_device failed"); 962 SBP2_ERR("scsi_add_device failed");
963 sbp2_logout_device(scsi_id);
964 sbp2_remove_device(scsi_id);
963 return error; 965 return error;
964 } 966 }
965 967