power: supply: max14577: remove unneeded variable initialization
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Mon, 19 Apr 2021 16:33:32 +0000 (18:33 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 20 Apr 2021 14:18:08 +0000 (16:18 +0200)
The local 'current_bits' variable does not have to be initialized
because all cases in following switch() either return or initialize it.

Addresses-Coverity: Unused value
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max14577_charger.c

index dcedae18d7be078172753e8bed9249eb46cf6739..f244cd902eb947a860c6294d9fba5aff2172c969 100644 (file)
@@ -261,7 +261,7 @@ static int max14577_init_constant_voltage(struct max14577_charger *chg,
 static int max14577_init_eoc(struct max14577_charger *chg,
                unsigned int uamp)
 {
-       unsigned int current_bits = 0xf;
+       unsigned int current_bits;
        u8 reg_data;
 
        switch (chg->max14577->dev_type) {