linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: ds1672: remove unnecessary check
@ 2019-08-18 21:52 Alexandre Belloni
  0 siblings, 0 replies; only message in thread
From: Alexandre Belloni @ 2019-08-18 21:52 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

The rtc pointer is already checked earlier, it is not necessary to check it
again.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-ds1672.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c
index e9e8d02743ee..9da84df9f152 100644
--- a/drivers/rtc/rtc-ds1672.c
+++ b/drivers/rtc/rtc-ds1672.c
@@ -128,9 +128,6 @@ static int ds1672_probe(struct i2c_client *client,
 	if (err)
 		return err;
 
-	if (IS_ERR(rtc))
-		return PTR_ERR(rtc);
-
 	i2c_set_clientdata(client, rtc);
 
 	return 0;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-18 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18 21:52 [PATCH] rtc: ds1672: remove unnecessary check 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).