1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/usb/gadget/udc/bdc
Uwe Kleine-König ee8455c07c usb: bdc: 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() is
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 <u.kleine-koenig@pengutronix.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230517230239.187727-29-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 12:36:25 +01:00
..
bdc.h usb: gadget: bdc: use the BIT macro to define bit filed 2021-01-13 11:24:02 +01:00
bdc_cmd.c usb: gadget: bdc: fix typo in comment 2022-06-10 11:49:12 +02:00
bdc_cmd.h usb: gadget: bdc: add identifier name for function declaraion 2021-01-13 11:24:02 +01:00
bdc_core.c usb: bdc: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
bdc_dbg.c usb: gadget: bdc: fix warning of embedded function name 2021-01-13 11:24:02 +01:00
bdc_dbg.h usb: gadget: bdc: add identifier name for function declaraion 2021-01-13 11:24:02 +01:00
bdc_ep.c usb: gadget: bdc: remove usage of list iterator past the loop body 2022-03-15 18:19:43 +01:00
bdc_ep.h usb: gadget: bdc: add identifier name for function declaraion 2021-01-13 11:24:02 +01:00
bdc_udc.c usb: bdc: change state when port disconnected 2022-10-22 12:51:53 +02:00
Kconfig usb: bdc: Remove the BDC PCI driver 2021-01-18 18:36:31 +01:00
Makefile usb: bdc: Remove the BDC PCI driver 2021-01-18 18:36:31 +01:00