Skip to content

Commit 3b60f45

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl()
In case the "core_clk_unipro" clock is not provided, "cycles_in_1us" variable will be used as uninitialized. So initialize it with 0. Issue reported by Smatch tool: drivers/ufs/host/ufs-qcom.c:1336 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. drivers/ufs/host/ufs-qcom.c:1341 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. Reviewed-by: Nitin Rawat <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Andrew Halaney <[email protected]> # sa8775p-ride Signed-off-by: Martin K. Petersen <[email protected]>
1 parent be2e06c commit 3b60f45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up)
12981298
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
12991299
struct list_head *head = &hba->clk_list_head;
13001300
struct ufs_clk_info *clki;
1301-
u32 cycles_in_1us;
1301+
u32 cycles_in_1us = 0;
13021302
u32 core_clk_ctrl_reg;
13031303
int err;
13041304

0 commit comments

Comments
 (0)