From: Li Zhengyu Date: Mon, 9 May 2022 09:21:02 +0000 (+0800) Subject: clk: fixed-rate: Remove redundant if statement X-Git-Tag: v5.19-rc1~117^2~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b69b0adc71637d436883c5ed9bfadbfbb7e02fda;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20220509092102.140520-1-lizhengyu3@huawei.com Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 45501637705c3..ac68a6b40f0e5 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);