public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
From: Xu Wang <vulab@iscas.ac.cn>
To: a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com,
	linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
Date: Fri, 13 Nov 2020 07:45:38 +0000	[thread overview]
Message-ID: <20201113074538.65028-1-vulab@iscas.ac.cn> (raw)

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


             reply	other threads:[~2020-11-13  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  7:45 Xu Wang [this message]
2020-11-13 23:12 ` [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Florian Fainelli
2020-11-14 22:52 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113074538.65028-1-vulab@iscas.ac.cn \
    --to=vulab@iscas.ac.cn \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox