scsi: smartpqi: correct REGNEWD return status
authorMurthy Bhat <Murthy.Bhat@microsemi.com>
Thu, 22 Aug 2019 20:39:44 +0000 (15:39 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Aug 2019 22:31:39 +0000 (18:31 -0400)
Return -EINPROGRESS when a rescan worker is queued.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Murthy Bhat <Murthy.Bhat@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi_init.c

index 159e9cfc29967c1cbb916598dbad173e68ffe61e..61371ea35bb31368107f52ce7fbc9f5ffbcbdcff 100644 (file)
@@ -2243,7 +2243,7 @@ static int pqi_scan_scsi_devices(struct pqi_ctrl_info *ctrl_info)
 
        if (!mutex_trylock(&ctrl_info->scan_mutex)) {
                pqi_schedule_rescan_worker_delayed(ctrl_info);
-
+               rc = -EINPROGRESS;
        } else {
                rc = pqi_update_scsi_devices(ctrl_info);
                if (rc)