1

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>
This commit is contained in:
Li Zhengyu 2022-05-09 17:21:02 +08:00 committed by Stephen Boyd
parent 14364fca21
commit b69b0adc71

View File

@ -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);