summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorLi Zhengyu <lizhengyu3@huawei.com>2022-05-09 12:21:02 +0300
committerStephen Boyd <sboyd@kernel.org>2022-05-17 09:45:53 +0300
commitb69b0adc71637d436883c5ed9bfadbfbb7e02fda (patch)
treea74f08301d1acc84cc03961a2f406aca71209dd7 /drivers/clk
parent14364fca21208d0954d594e1eccb4ad239881081 (diff)
downloadlinux-b69b0adc71637d436883c5ed9bfadbfbb7e02fda.tar.xz
clk: fixed-rate: Remove redundant if statement
(np) is always true when (dev || !np) is false, so just remove the check. Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com> Link: https://lore.kernel.org/r/20220509092102.140520-1-lizhengyu3@huawei.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-fixed-rate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index 45501637705c..ac68a6b40f0e 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -87,7 +87,7 @@ struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev,
hw = &fixed->hw;
if (dev || !np)
ret = clk_hw_register(dev, hw);
- else if (np)
+ else
ret = of_clk_hw_register(np, hw);
if (ret) {
kfree(fixed);