Commit 693b9021 authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Stefan Richter

firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack.

Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 9472316b
...@@ -1099,6 +1099,7 @@ static int add_scsi_devices(struct fw_unit *unit) ...@@ -1099,6 +1099,7 @@ static int add_scsi_devices(struct fw_unit *unit)
if (retval < 0) { if (retval < 0) {
fw_error("failed to add scsi host\n"); fw_error("failed to add scsi host\n");
scsi_host_put(sd->scsi_host); scsi_host_put(sd->scsi_host);
sd->scsi_host = NULL;
return retval; return retval;
} }
...@@ -1109,6 +1110,7 @@ static int add_scsi_devices(struct fw_unit *unit) ...@@ -1109,6 +1110,7 @@ static int add_scsi_devices(struct fw_unit *unit)
fw_error("failed to add scsi device\n"); fw_error("failed to add scsi device\n");
scsi_remove_host(sd->scsi_host); scsi_remove_host(sd->scsi_host);
scsi_host_put(sd->scsi_host); scsi_host_put(sd->scsi_host);
sd->scsi_host = NULL;
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment