summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-03-31 10:41:11 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-31 22:13:49 -0400
commit4e6c78d16a798bdc54a95528be670535701540f8 (patch)
treee5e35884fd5a742ecb8a89acf324588a76f21ffb /drivers/scsi/aacraid
parent72655c0ebd1d941d80f47bf614b02d563a1e61ae (diff)
downloadlinux-4e6c78d16a798bdc54a95528be670535701540f8.tar.gz
linux-4e6c78d16a798bdc54a95528be670535701540f8.tar.bz2
linux-4e6c78d16a798bdc54a95528be670535701540f8.zip
scsi: aacraid: do not overwrite retval in aac_reset_adapter()
'retval' got assigned a value twice, causing the original value to be lost. Link: https://lore.kernel.org/r/20200331084111.95039-1-hare@suse.de Fixes: 3d3ca53b1639 ("scsi: aacraid: use scsi_host_(block,unblock) to block I/O") Reported-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/commsup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 4725e4c763cf..ddd73f6798af 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1626,7 +1626,7 @@ out:
int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
{
unsigned long flagv = 0;
- int retval;
+ int retval, unblock_retval;
struct Scsi_Host *host = aac->scsi_host_ptr;
int bled;
@@ -1656,8 +1656,9 @@ int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
retval = _aac_reset_adapter(aac, bled, reset_type);
spin_unlock_irqrestore(host->host_lock, flagv);
- retval = scsi_host_unblock(host, SDEV_RUNNING);
-
+ unblock_retval = scsi_host_unblock(host, SDEV_RUNNING);
+ if (!retval)
+ retval = unblock_retval;
if ((forced < 2) && (retval == -ENODEV)) {
/* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */
struct fib * fibctx = aac_fib_alloc(aac);