linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: fixed-rate: Remove redundant if statement
@ 2022-05-09  9:21 Li Zhengyu
  2022-05-17  6:45 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhengyu @ 2022-05-09  9:21 UTC (permalink / raw)
  To: sboyd; +Cc: linux-clk, linux-kernel, manivannan.sadhasivam, mturquette

(np) is always true when (dev || !np) is false, so just remove
the check.

Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
---
 drivers/clk/clk-fixed-rate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: fixed-rate: Remove redundant if statement
  2022-05-09  9:21 [PATCH] clk: fixed-rate: Remove redundant if statement Li Zhengyu
@ 2022-05-17  6:45 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-05-17  6:45 UTC (permalink / raw)
  To: Li Zhengyu; +Cc: linux-clk, linux-kernel, manivannan.sadhasivam, mturquette

Quoting Li Zhengyu (2022-05-09 02:21:02)
> (np) is always true when (dev || !np) is false, so just remove
> the check.
> 
> Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-17  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:21 [PATCH] clk: fixed-rate: Remove redundant if statement Li Zhengyu
2022-05-17  6:45 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).