From 693b9021767750cbac2c92e918d25ddadbab7c61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 14 Mar 2007 17:34:56 -0400 Subject: [PATCH] firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5