Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37C8823EA83; Sat, 17 Oct 2026 17:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792259629; cv=none; b=cPXaR9dJ8UkxjkTAov+ZckxPH6vy/uRXMX4apxCJHNQI3k38IY6htP7vFjzvK/ybPpgDXxGbYocJL432NNEakRGX8E8Uys8klOI4DUtGDEIKkfBLf2Fi86fHYIGCnSs0hGxo5sDq+S2/Kz6jzKp9SduC1YpH7gTwuI5GYejwFds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792259629; c=relaxed/simple; bh=COL2avyqa4dkyTWp0JAFOl5N9TQhQc+6GGx7UKQJ3n8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iEkg7GZkkPUAIo4GPGYAZWR+HF5DyJPFyvWPgI0rfD10E8kXq+56rjURmlgE33YQzhAJuRxCby/Qhos+sT2KlMUrRGHFuhcXJQVBJWTOh7TU9izUxFPstP7Quz5z9ZdkWxh7fXZ7Tb1phB4lNwPMnw8w9f1yOEcgtxgX/MNUohk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Lh7OAmx1; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Lh7OAmx1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F1EA1F000C4; Sat, 17 Oct 2026 17:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792259628; bh=xhrcFOA/12kXoMt67nCLvnort3508FZPAd12Gvrcef8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Lh7OAmx1VmVRU3ctgBBnSyEirnV63v9+2RbTX/DVf2JzHA3YQlncoQBtYOHc4sdjE FBuSg3h4178yPn7IDDY0eVc6Yt1htnWuW/CpNoODwZPcRF6O9QIyFW9huA2JBYGCUC vqcsOERnBujzK7NLevIYx7SPD9mgTCtJtPCbrdww= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Sebastian Reichel , Sasha Levin Subject: [PATCH 6.6 1275/1674] power: supply: charger-manager: Convert to platform remove callback returning void Date: Sat, 17 Oct 2026 17:59:07 +0200 Message-ID: <20261017160503.870160834@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160431.119607952@linuxfoundation.org> References: <20261017160431.119607952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit 403eebf95c38302cacc48c127e575461f0e798be ] The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230918133700.1254499-8-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel Stable-dep-of: c57cb36f76eb ("power: supply: charger-manager: register regulators before exposing sysfs") Signed-off-by: Sasha Levin --- drivers/power/supply/charger-manager.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index b874947b84f2b..42a7e4f045d82 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -1630,7 +1630,7 @@ static int charger_manager_probe(struct platform_device *pdev) return ret; } -static int charger_manager_remove(struct platform_device *pdev) +static void charger_manager_remove(struct platform_device *pdev) { struct charger_manager *cm = platform_get_drvdata(pdev); struct charger_desc *desc = cm->desc; @@ -1650,8 +1650,6 @@ static int charger_manager_remove(struct platform_device *pdev) power_supply_unregister(cm->charger_psy); try_charger_enable(cm, false); - - return 0; } static const struct platform_device_id charger_manager_id[] = { @@ -1742,7 +1740,7 @@ static struct platform_driver charger_manager_driver = { .of_match_table = charger_manager_match, }, .probe = charger_manager_probe, - .remove = charger_manager_remove, + .remove_new = charger_manager_remove, .id_table = charger_manager_id, }; -- 2.53.0