From dc3edd5412341b02d84144ddfd5bf6ccaaeeb1ac Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Mon, 12 Dec 2005 23:03:30 -0500 Subject: 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 Signed-off-by: Jody McIntyre --- drivers/ieee1394/sbp2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/ieee1394/sbp2.c') 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: error = scsi_add_device(scsi_id->scsi_host, 0, scsi_id->ud->id, 0); if (error) { SBP2_ERR("scsi_add_device failed"); + sbp2_logout_device(scsi_id); + sbp2_remove_device(scsi_id); return error; } -- cgit v1.2.2