linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
	Jonathan Bakker <xc-racer2@live.ca>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 6/7] power: supply: charger-manager: drop unused charger assignment
Date: Fri, 11 Sep 2020 18:27:28 +0200	[thread overview]
Message-ID: <20200911162729.3022-6-krzk@kernel.org> (raw)
In-Reply-To: <20200911162729.3022-1-krzk@kernel.org>

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@kernel.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


  parent reply	other threads:[~2020-09-11 16:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 16:27 [PATCH 1/7] power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI Krzysztof Kozlowski
2020-09-11 16:27 ` [PATCH 2/7] power: supply: bq2515x: fix kerneldoc Krzysztof Kozlowski
2020-09-11 16:27 ` [PATCH 3/7] power: supply: bq25890: skip 'struct acpi_device_id' when !CONFIG_ACPI Krzysztof Kozlowski
2020-09-11 16:27 ` [PATCH 4/7] power: supply: goldfish: " Krzysztof Kozlowski
2020-09-11 16:27 ` [PATCH 5/7] power: supply: rt9455: " Krzysztof Kozlowski
2020-09-11 16:27 ` Krzysztof Kozlowski [this message]
2020-09-11 16:27 ` [PATCH 7/7] power: supply: pm2301: drop duplicated i2c_device_id Krzysztof Kozlowski
2020-10-03 20:29 ` [PATCH 1/7] power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911162729.3022-6-krzk@kernel.org \
    --to=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=xc-racer2@live.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).