summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/bus.c
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2021-02-08 17:31:49 +0300
committerJohan Hovold <johan@kernel.org>2021-02-09 15:13:58 +0300
commitc5d1448fa353242635fa3e1fed6ab4558e0e7d9a (patch)
treed74c1132f17bd3f0ad29a6565e887f541169bd00 /drivers/usb/serial/bus.c
parenta54af1b7d667927162d13083a8e2d470fb8722e2 (diff)
downloadlinux-c5d1448fa353242635fa3e1fed6ab4558e0e7d9a.tar.xz
USB: serial: make remove callback return void
All usb_serial drivers return 0 in their remove callbacks and driver core ignores the value returned by usb_serial_device_remove(). So change the remove callback to return void and return 0 unconditionally in usb_serial_device_remove(). Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/bus.c')
-rw-r--r--drivers/usb/serial/bus.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index 58206ef0a780..1a8c7821d00a 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -88,7 +88,6 @@ static int usb_serial_device_remove(struct device *dev)
{
struct usb_serial_port *port = to_usb_serial_port(dev);
struct usb_serial_driver *driver;
- int retval = 0;
int minor;
int autopm_err;
@@ -105,7 +104,7 @@ static int usb_serial_device_remove(struct device *dev)
driver = port->serial->type;
if (driver->port_remove)
- retval = driver->port_remove(port);
+ driver->port_remove(port);
dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
driver->description, minor);
@@ -113,7 +112,7 @@ static int usb_serial_device_remove(struct device *dev)
if (!autopm_err)
usb_autopm_put_interface(port->serial->interface);
- return retval;
+ return 0;
}
static ssize_t new_id_store(struct device_driver *driver,