Skip to content

Commit

Permalink
clk: fixed-rate: Remove redundant if statement
Browse files Browse the repository at this point in the history
(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>
  • Loading branch information
Li Zhengyu authored and Stephen Boyd committed May 17, 2022
1 parent 14364fc commit b69b0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk-fixed-rate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b69b0ad

Please sign in to comment.