summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-14 17:34:56 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-15 18:21:36 +0100
commit693b9021767750cbac2c92e918d25ddadbab7c61 (patch)
treeba1f942bd4fca487d51374ec40041feb5efcbe31 /drivers/firewire
parent9472316b6eab3500ded544f6e86700c33541ef4e (diff)
firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-sbp2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 2e5479b972fe..0c87724cec3f 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1099,6 +1099,7 @@ static int add_scsi_devices(struct fw_unit *unit)
if (retval < 0) {
fw_error("failed to add scsi host\n");
scsi_host_put(sd->scsi_host);
+ sd->scsi_host = NULL;
return retval;
}
@@ -1109,6 +1110,7 @@ static int add_scsi_devices(struct fw_unit *unit)
fw_error("failed to add scsi device\n");
scsi_remove_host(sd->scsi_host);
scsi_host_put(sd->scsi_host);
+ sd->scsi_host = NULL;
return retval;
}