Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7c5b03c authored by Asutosh Das's avatar Asutosh Das Committed by Gerrit - the friendly Code Review server
Browse files

scsi: ufs: Initialize offset to a default value.



This patch initializes offset to a default value.
This is done to silence 'offset might be used uninitialized
in this function' warning.

Change-Id: Ia36b1a7eda04afd5a52ae2a5d92535c529aa244b
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent f5c48058
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2499,7 +2499,7 @@ bool ufs_qcom_testbus_cfg_is_ok(struct ufs_qcom_host *host,
int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
{
	int reg = 0;
	int offset, ret = 0, testbus_sel_offset = 19;
	int offset = -1, ret = 0, testbus_sel_offset = 19;
	u32 mask = TEST_BUS_SUB_SEL_MASK;
	unsigned long flags;
	struct ufs_hba *hba;
@@ -2564,6 +2564,12 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
	 * is legal
	 */
	}
	if (offset < 0) {
		dev_err(hba->dev, "%s: Bad offset: %d\n", __func__, offset);
		ret = -EINVAL;
		spin_unlock_irqrestore(hba->host->host_lock, flags);
		goto out;
	}
	mask <<= offset;

	spin_unlock_irqrestore(hba->host->host_lock, flags);