提交 eda910e4 编写于 作者: D Dolev Raviv 提交者: Christoph Hellwig

scsi: ufs: fix static checker warning in __ufshcd_setup_clocks

This patch fixes newly introduced static checker warning in
__ufshcd_setup_clocks, introduced by UFS power management series.

Warning:
drivers/scsi/ufs/ufshcd.c:4474 __ufshcd_setup_clocks()
warn: we tested 'ret' before and it was 'false'

To fix it we remove the (!ret) from the condition.
Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
Reviewed-by: NMaya Erez <merez@codeaurora.org>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 758581b9
...@@ -4473,7 +4473,7 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, ...@@ -4473,7 +4473,7 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
if (!IS_ERR_OR_NULL(clki->clk) && clki->enabled) if (!IS_ERR_OR_NULL(clki->clk) && clki->enabled)
clk_disable_unprepare(clki->clk); clk_disable_unprepare(clki->clk);
} }
} else if (!ret && on) { } else if (on) {
spin_lock_irqsave(hba->host->host_lock, flags); spin_lock_irqsave(hba->host->host_lock, flags);
hba->clk_gating.state = CLKS_ON; hba->clk_gating.state = CLKS_ON;
spin_unlock_irqrestore(hba->host->host_lock, flags); spin_unlock_irqrestore(hba->host->host_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册