summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSayali Lokhande <sayalil@codeaurora.org>2018-03-14 15:20:10 +0530
committerSayali Lokhande <sayalil@codeaurora.org>2018-03-14 15:20:10 +0530
commitccd33fbf9b926cd318127f4f6fc13237162e3c97 (patch)
tree99b164b4bc0f739acfdc884cef0dadff63c3027b
parent3e1f25e9559f01dcaf266c4ece9fee779af3e244 (diff)
scsi: ufs: Avoid uninitialized use of offset
In function ufs_qcom_testbus_config, offset variable is declared but not initialized. Switch case can take the default case and use the uninitialized offset variable. This change fixes the uninitialized use of offset. Change-Id: I772296ef5606bc519dfcd00bfa6995b2d8646b9c Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
-rw-r--r--drivers/scsi/ufs/ufs-qcom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 105d861a2325..aaddf2fff99c 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -2596,7 +2596,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 = 0, ret = 0, testbus_sel_offset = 19;
u32 mask = TEST_BUS_SUB_SEL_MASK;
unsigned long flags;
struct ufs_hba *hba;