linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] power: supply: max14577: remove unneeded variable initialization
@ 2021-04-19 16:33 Krzysztof Kozlowski
  2021-04-19 16:33 ` [PATCH 2/5] power: supply: max17040: handle device_property_read_u8_array() failure Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-19 16:33 UTC (permalink / raw)
  To: Sebastian Reichel, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, linux-pm, linux-kernel

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-19 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 16:33 [PATCH 1/5] power: supply: max14577: remove unneeded variable initialization Krzysztof Kozlowski
2021-04-19 16:33 ` [PATCH 2/5] power: supply: max17040: handle device_property_read_u8_array() failure Krzysztof Kozlowski
2021-04-19 16:33 ` [PATCH 3/5] power: supply: max17040: remove unneeded double cast Krzysztof Kozlowski
2021-04-19 16:33 ` [PATCH 4/5] power: supply: act8945a: correct kerneldoc Krzysztof Kozlowski
2021-04-19 16:33 ` [PATCH 5/5] power: supply: bq256xx: add kerneldoc for structure members Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).