scsi: hisi_sas: add missing break in switch statement
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Mar 2017 11:12:22 +0000 (12:12 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 30 Mar 2017 02:38:53 +0000 (22:38 -0400)
It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case
got accidentally removed in an earlier commit, as it stands, the
ts->stat and ts->open_rej_reason are being updated twice for this case
which looks incorrect.  Fix this by adding in the missing break
statement.

Detected by CoverityScan, CID#1422110 ("Missing break in switch")

Fixes: 634a9585f49c7 ("scsi: hisi_sas: process error codes according to their priority")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

index a3af380dde9e407aa7531c7131e713acf7f6cdfc..66c2de8b7b6461fd9b3e0e0fa173e307261b7ceb 100644 (file)
@@ -1709,6 +1709,7 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
                {
                        ts->stat = SAS_OPEN_REJECT;
                        ts->open_rej_reason = SAS_OREJ_NO_DEST;
+                       break;
                }
                case TRANS_TX_OPEN_CNX_ERR_PROTOCOL_NOT_SUPPORTED:
                {