Skip to content

Commit

Permalink
sbp2: did not clean up after scsi_add_device() failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter authored and Jody McIntyre committed Dec 13, 2005
1 parent 43863eb commit dc3edd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/ieee1394/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,8 @@ static int sbp2_start_device(struct scsi_id_instance_data *scsi_id)
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;
}

Expand Down

0 comments on commit dc3edd5

Please sign in to comment.