diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-10-27 00:17:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-27 12:56:02 +0200 |
commit | 3d56e5aa6727f5055d1ad879342ad1a8acec2134 (patch) | |
tree | 325db6e0802002e06cffc364ea4a6a542e0d2f6c /drivers/usb/cdns3/cdnsp-ring.c | |
parent | dt-bindings: usb: fsa4480: Add compatible for OCP96011 (diff) | |
download | linux-3d56e5aa6727f5055d1ad879342ad1a8acec2134.tar.xz linux-3d56e5aa6727f5055d1ad879342ad1a8acec2134.zip |
usb: gadget: aspeed_udc: Convert to platform remove callback returning void
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().
ast_udc_remove() is one of these functions that return an error code
after doing only a partial cleanup. Replace the core's error message by
a more drastic one and still convert the driver to .remove_new().
Note the only semantic change here is the changed error message.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231026221701.2521483-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-ring.c')
0 files changed, 0 insertions, 0 deletions