[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200911162729.3022-6-krzk@kernel.org>
Date: Fri, 11 Sep 2020 18:27:28 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Sebastian Reichel <sre@...nel.org>,
Jonathan Bakker <xc-racer2@...e.ca>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Krzysztof Kozlowski <krzk@...nel.org>
Subject: [PATCH 6/7] power: supply: charger-manager: drop unused charger assignment
The 'charger' variable in error path is assigned but never used:
drivers/power/supply/charger-manager.c: In function 'charger_manager_probe':
drivers/power/supply/charger-manager.c:1626:29: warning: variable 'charger' set but not used [-Wunused-but-set-variable]
Fixes: c1f73028f75d ("power: supply: charger-manager: Update extcon functions")
Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
---
drivers/power/supply/charger-manager.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 07992821e252..b2ca79173f95 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1622,13 +1622,8 @@ static int charger_manager_probe(struct platform_device *pdev)
return 0;
err_reg_extcon:
- for (i = 0; i < desc->num_charger_regulators; i++) {
- struct charger_regulator *charger;
-
- charger = &desc->charger_regulators[i];
-
+ for (i = 0; i < desc->num_charger_regulators; i++)
regulator_put(desc->charger_regulators[i].consumer);
- }
power_supply_unregister(cm->charger_psy);
--
2.17.1
Powered by blists - more mailing lists