]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: musb: omap2430: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 21 Aug 2025 15:09:56 +0000 (11:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:24:32 +0000 (16:24 +0200)
commit1be6c638f72d71ffbba564e4692bc1fe941880eb
tree23af353fb117b926b5a9e676b1f38c17a5407718
parent69bea84b06b5e779627e7afdbf4b60a7d231c76f
usb: musb: omap2430: Convert to platform remove callback returning void

[ Upstream commit cb020bf52253327fe382e10bcae02a4f1da33c04 ]

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>
Link: https://lore.kernel.org/r/20230405141009.3400693-8-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 1473e9e7679b ("usb: musb: omap2430: fix device leak at unbind")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/omap2430.c