linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
@ 2020-11-13  7:45 Xu Wang
  2020-11-13 23:12 ` Florian Fainelli
  2020-11-14 22:52 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Xu Wang @ 2020-11-13  7:45 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, f.fainelli, bcm-kernel-feedback-list,
	linux-rtc, linux-arm-kernel
  Cc: linux-kernel

Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/rtc/rtc-brcmstb-waketimer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c
index 4fee57c51280..375a9987a1d6 100644
--- a/drivers/rtc/rtc-brcmstb-waketimer.c
+++ b/drivers/rtc/rtc-brcmstb-waketimer.c
@@ -264,8 +264,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev)
 	unregister_reboot_notifier(&timer->reboot_notifier);
 
 err_clk:
-	if (timer->clk)
-		clk_disable_unprepare(timer->clk);
+	clk_disable_unprepare(timer->clk);
 
 	return ret;
 }
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
  2020-11-13  7:45 [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Xu Wang
@ 2020-11-13 23:12 ` Florian Fainelli
  2020-11-14 22:52 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-11-13 23:12 UTC (permalink / raw)
  To: Xu Wang, a.zummo, alexandre.belloni, f.fainelli,
	bcm-kernel-feedback-list, linux-rtc, linux-arm-kernel
  Cc: linux-kernel

On 11/12/20 11:45 PM, Xu Wang wrote:
> Because clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
  2020-11-13  7:45 [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Xu Wang
  2020-11-13 23:12 ` Florian Fainelli
@ 2020-11-14 22:52 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2020-11-14 22:52 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, a.zummo, linux-arm-kernel, f.fainelli,
	Xu Wang, linux-rtc
  Cc: Alexandre Belloni, linux-kernel

On Fri, 13 Nov 2020 07:45:38 +0000, Xu Wang wrote:
> Because clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.

Applied, thanks!

[1/1] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
      commit: 910d002d84df21da61cadba92dd510ece5e46312

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-14 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  7:45 [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Xu Wang
2020-11-13 23:12 ` Florian Fainelli
2020-11-14 22:52 ` Alexandre Belloni

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).