Hello,
On Sun, Sep 17, 2023 at 09:13:13PM +0200, Greg Kroah-Hartman wrote:
6.1-stable review patch. If anyone has any objections, please let me know.
From: Uwe Kleine-König u.kleine-koenig@pengutronix.de
[ Upstream commit 9609284a76978daf53a54e05cff36873a75e4d13 ]
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 (mostly) ignored 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.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de Reviewed-by: Claudiu Beznea claudiu.beznea@microchip.com Signed-off-by: Thierry Reding thierry.reding@gmail.com Stable-dep-of: c11622324c02 ("pwm: atmel-tcb: Fix resource freeing in error path and remove") Signed-off-by: Sasha Levin sashal@kernel.org
This is similar to the other backport I wondered about[1]. IMHO dropping this patch an resolving the (simple) resolving conflict is the more sensible approach here. (But keeping this patch doesn't hurt either.)
The other dependency of c11622324c02 ("pwm: atmel-tcb: Fix resource freeing in error path and remove") is not that trivial to back out, so I'd keep it (= "pwm: atmel-tcb: Harmonize resource allocation order").
Best regards Uwe
[1] https://lore.kernel.org/stable/20231009154949.33tpn4fsbacllhme@pengutronix.d...