[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210419163336.64075-1-krzysztof.kozlowski@canonical.com>
Date: Mon, 19 Apr 2021 18:33:32 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Sebastian Reichel <sre@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/5] 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@...onical.com>
---
drivers/power/supply/max14577_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.25.1
Powered by blists - more mailing lists