From: Hannes Reinecke Date: Thu, 4 Jan 2018 12:57:01 +0000 (-0800) Subject: scsi: mpt3sas: set default value for cb_idx X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ba4494d47bd02e5757b449a2cc2222fa3ff87bc8;p=openwrt%2Fstaging%2Fblogic.git scsi: mpt3sas: set default value for cb_idx No functional change Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 08237b8659ae..e3857e5fb8ab 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -899,7 +899,7 @@ static u8 _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) { int i; - u8 cb_idx; + u8 cb_idx = 0xFF; if (smid < ioc->hi_priority_smid) { i = smid - 1; @@ -910,8 +910,7 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) } else if (smid <= ioc->hba_queue_depth) { i = smid - ioc->internal_smid; cb_idx = ioc->internal_lookup[i].cb_idx; - } else - cb_idx = 0xFF; + } return cb_idx; }