From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C54013B19AF; Mon, 23 Mar 2026 15:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774279713; cv=none; b=itpmKZAAzlWwh11EbWW+g7KUZRgpWKXDs4EaJRIxQVqMoAy5MlAikJiN2TDQADwd+7HRAfmmQame2vjE5jnXN9FyWneThxJidYnOxcMPU6rPPKBt166Bdm7rFR5ypWy+e+giSVATDJmZF2UeddHKuu+AhBNf5NtphO6x+QWKjmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774279713; c=relaxed/simple; bh=juiokmnXDodA4d3zdSAzkxnK3ne+ZW5KP5UlKQ26/kM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YB4eVmSeYjMMyMmDTncAGFaZLIyvgzfvRm47VO6SMApU5ycUsD4z2B/CHI8a5cFcpWi9E/jvM4v39coLQScNcwx7uc3D2X6r6t9IFjkxCSLi5vXoWJKNwolq3VhX8lbrQIesxCFjWXhGdDbXQq9/DOTZNmpbBSbVU6qedj6XEyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PEpmCS83; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PEpmCS83" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CCF6C4CEF7; Mon, 23 Mar 2026 15:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774279713; bh=juiokmnXDodA4d3zdSAzkxnK3ne+ZW5KP5UlKQ26/kM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PEpmCS838C+eCcL3mqEKleTyMvOvaZMTaUrihfGVM82hiHfL8KfeOOoQcL75KRlR8 JxT5Dvo8T53Z8Zgcr+0gnivoI95B2ii59Vn1NjMkOTN9ATbqto8hsQSma5pjuw0SsN pNIrCMbIIL+C93sorT7eR+l4QeiiSfW2kVKAw6PE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Konrad Dybcio , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones , Sasha Levin Subject: [PATCH 6.1 054/481] mfd: qcom-pm8xxx: Convert to platform remove callback returning void Date: Mon, 23 Mar 2026 14:40:36 +0100 Message-ID: <20260323134526.542068707@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134525.256603107@linuxfoundation.org> References: <20260323134525.256603107@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit 19ea1d3953017518d85db35b69b5aea9bc64d630 ] 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() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Konrad Dybcio Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-14-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones Stable-dep-of: 27a8acea47a9 ("mfd: qcom-pm8xxx: Fix OF populate on driver rebind") Signed-off-by: Sasha Levin --- drivers/mfd/qcom-pm8xxx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c index 2f2734ba5273e..8831448371290 100644 --- a/drivers/mfd/qcom-pm8xxx.c +++ b/drivers/mfd/qcom-pm8xxx.c @@ -587,19 +587,17 @@ static int pm8xxx_remove_child(struct device *dev, void *unused) return 0; } -static int pm8xxx_remove(struct platform_device *pdev) +static void pm8xxx_remove(struct platform_device *pdev) { struct pm_irq_chip *chip = platform_get_drvdata(pdev); device_for_each_child(&pdev->dev, NULL, pm8xxx_remove_child); irq_domain_remove(chip->irqdomain); - - return 0; } static struct platform_driver pm8xxx_driver = { .probe = pm8xxx_probe, - .remove = pm8xxx_remove, + .remove_new = pm8xxx_remove, .driver = { .name = "pm8xxx-core", .of_match_table = pm8xxx_id_table, -- 2.51.0