power: supply: pm2301_charger: remove unnecessary variable
authorNigel Christian <nigel.l.christian@gmail.com>
Sat, 14 Nov 2020 04:57:47 +0000 (23:57 -0500)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 30 Nov 2020 00:44:11 +0000 (01:44 +0100)
The variable "ret" is initialized to zero and then returned.
Remove it and return zero.

Signed-off-by: Nigel Christian <nigel.l.christian@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/pm2301_charger.c

index 2df6a2459d1f19b0de9fec05844af9f9074f7d87..ac06ecf7fc9ca04004d4abd123f629f2ced4655b 100644 (file)
@@ -455,7 +455,6 @@ static int pm2_int_reg4(void *pm2_data, int val)
 static int pm2_int_reg5(void *pm2_data, int val)
 {
        struct pm2xxx_charger *pm2 = pm2_data;
-       int ret = 0;
 
        if (val & (PM2XXX_INT6_ITVPWR2DROP | PM2XXX_INT6_ITVPWR1DROP)) {
                dev_dbg(pm2->dev, "VMPWR drop to VBAT level\n");
@@ -468,7 +467,7 @@ static int pm2_int_reg5(void *pm2_data, int val)
                dev_dbg(pm2->dev, "Falling/Rising edge on WPWR1/2\n");
        }
 
-       return ret;
+       return 0;
 }
 
 static irqreturn_t  pm2xxx_irq_int(int irq, void *data)