rtc: v3020: remove redundant initialization of variable retval
authorColin Ian King <colin.king@canonical.com>
Wed, 9 Jun 2021 12:00:50 +0000 (13:00 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 20 Jun 2021 20:29:50 +0000 (22:29 +0200)
The variable retval is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210609120050.185746-1-colin.king@canonical.com
drivers/rtc/rtc-v3020.c

index d2da921..4e8341c 100644 (file)
@@ -282,7 +282,7 @@ static int rtc_probe(struct platform_device *pdev)
 {
        struct v3020_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct v3020 *chip;
-       int retval = -EBUSY;
+       int retval;
        int i;
 
        chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);