scsi: smartpqi: eliminate redundant error messages
authorKevin Barnett <kevin.barnett@hpe.com>
Wed, 3 May 2017 23:53:36 +0000 (18:53 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:48:02 +0000 (20:48 -0400)
eliminate redundant error message during initialization
if the controller has crashed.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Signed-off-by: Kevin Barnett <kevin.barnett@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
drivers/scsi/smartpqi/smartpqi_sis.c

index 0083ea4ff81aa47a05a1d92467769fbb180b5127..fa21dd4db01b5e0aa7f8ee543fa5581a8df3c44d 100644 (file)
@@ -5796,11 +5796,8 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)
         * commands.
         */
        rc = sis_wait_for_ctrl_ready(ctrl_info);
-       if (rc) {
-               dev_err(&ctrl_info->pci_dev->dev,
-                       "error initializing SIS interface\n");
+       if (rc)
                return rc;
-       }
 
        /*
         * Get the controller properties.  This allows us to determine
index 3155bda88550a74f6de9b9ce1ebbf82028e87fe4..d4b1cc76892199ab40a7fed83522620bdf4ebe63 100644 (file)
@@ -102,8 +102,11 @@ static int sis_wait_for_ctrl_ready_with_timeout(struct pqi_ctrl_info *ctrl_info,
                        if (status & SIS_CTRL_KERNEL_UP)
                                break;
                }
-               if (time_after(jiffies, timeout))
+               if (time_after(jiffies, timeout)) {
+                       dev_err(&ctrl_info->pci_dev->dev,
+                               "controller not ready\n");
                        return -ETIMEDOUT;
+               }
                msleep(SIS_CTRL_READY_POLL_INTERVAL_MSECS);
        }