From: Kristian Høgsberg Date: Wed, 14 Mar 2007 21:34:56 +0000 (-0400) Subject: firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack. X-Git-Tag: v2.6.22-rc1~111^2~48 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=693b9021767750cbac2c92e918d25ddadbab7c61;p=linux-2.6 firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 2e5479b972..0c87724cec 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; }