From mboxrd@z Thu Jan 1 00:00:00 1970 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 1EC8C27FD49; Tue, 16 Jun 2026 17:58:03 +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=1781632684; cv=none; b=hdmLzv0X/SNl/ZTSDXIqmVoVQs3apztNEBHLQJ1yagZr5uMZSYES6Npm4y45WQu2lvWYwdb/J7bzt5Hc+C1E15NB+BS269aK6rA95j6GF6DooTz4xl9GG+WJOKsK5tdYvWID4LRW+uYxN775d9EuDTmdED9ZQdvSoU9HQG2nV3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781632684; c=relaxed/simple; bh=Y3G2UIoSLbkNUMqM7Rt8DYpU32O3cDV7VEqwJOhxY0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G8fsvNu1DqQLGML/TjFQ2bRb+MzoQI6voMNIkAEPsnzK5GRa1dpKHFYPLTGpXh+VpWgjRug71QOKT30kLTNy6uQlk8kbqW3/tH3UufAUibnxviIHwgTW2xBr3jvJIv8ZU0SfHxkJMTmssEt7ZsKM9MRuxSCjBimdm+7zqdZWbcg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mvdXLRQM; 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="mvdXLRQM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 184561F000E9; Tue, 16 Jun 2026 17:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781632683; bh=6tqag7hLwX7NS9PBvCORsV3GfzBi37NQZSGo58NT2F0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mvdXLRQMlH5mxMFXi1WPr6miP3apYQ25BejE2+FpAJe3/Q4kMtcJWozWiGy04b//g VTBiS+Q8qzw+XIcTXX9E/Qp7Rt4AG3iyzebjRyN7s9QwBxKVrwWyaIVPVnnc2v4019 XExu4szp6mlD5ZI5rQ+Gy9wvGtzERuzY1Aud+6v0= 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?= , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.1 458/522] iio: adc: npcm: Convert to platform remove callback returning void Date: Tue, 16 Jun 2026 20:30:05 +0530 Message-ID: <20260616145147.323482436@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit 5253a5cc7709688b9a000f7928bfaa3366d0af98 ] 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230919174931.1417681-18-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron Stable-dep-of: 0d42e2c0bd6c ("iio: adc: npcm: fix unbalanced clk_disable_unprepare()") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/npcm_adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/iio/adc/npcm_adc.c +++ b/drivers/iio/adc/npcm_adc.c @@ -320,7 +320,7 @@ err_disable_clk: return ret; } -static int npcm_adc_remove(struct platform_device *pdev) +static void npcm_adc_remove(struct platform_device *pdev) { struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct npcm_adc *info = iio_priv(indio_dev); @@ -333,13 +333,11 @@ static int npcm_adc_remove(struct platfo if (!IS_ERR(info->vref)) regulator_disable(info->vref); clk_disable_unprepare(info->adc_clk); - - return 0; } static struct platform_driver npcm_adc_driver = { .probe = npcm_adc_probe, - .remove = npcm_adc_remove, + .remove_new = npcm_adc_remove, .driver = { .name = "npcm_adc", .of_match_table = npcm_adc_match,