rtc: ds1672: remove unnecessary check
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 18 Aug 2019 21:52:32 +0000 (23:52 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 21 Aug 2019 07:57:23 +0000 (09:57 +0200)
The rtc pointer is already checked earlier, it is not necessary to check it
again.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20190818215232.17320-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1672.c

index e9e8d02743ee516a033ab18b5e39d045669f74b7..9da84df9f15209943948d41d6e9a4ef2a602d12a 100644 (file)
@@ -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;