aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/supply
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-04-19 18:33:32 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-04-20 16:18:08 +0200
commit01dcfe7849875db439d24600d6d89ef40ae97eac (patch)
tree65797d4e4540897c4764cc949fb6a8edd4f9bd20 /drivers/power/supply
parentpower: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static (diff)
downloadlinux-dev-01dcfe7849875db439d24600d6d89ef40ae97eac.tar.xz
linux-dev-01dcfe7849875db439d24600d6d89ef40ae97eac.zip
power: supply: max14577: remove unneeded variable initialization
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>
Diffstat (limited to 'drivers/power/supply')
-rw-r--r--drivers/power/supply/max14577_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max14577_charger.c b/drivers/power/supply/max14577_charger.c
index dcedae18d7be..f244cd902eb9 100644
--- a/drivers/power/supply/max14577_charger.c
+++ b/drivers/power/supply/max14577_charger.c
@@ -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) {