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-Url: http://git.lede-project.org./?a=commitdiff_plain;h=693b9021767750cbac2c92e918d25ddadbab7c61;p=openwrt%2Fstaging%2Fblogic.git 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 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; }