summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7840.c
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2021-02-08 15:31:49 +0100
committerJohan Hovold <johan@kernel.org>2021-02-09 13:13:58 +0100
commitc5d1448fa353242635fa3e1fed6ab4558e0e7d9a (patch)
treed74c1132f17bd3f0ad29a6565e887f541169bd00 /drivers/usb/serial/mos7840.c
parentUSB: serial: drop if with an always false condition (diff)
downloadlinux-c5d1448fa353242635fa3e1fed6ab4558e0e7d9a.tar.xz
linux-c5d1448fa353242635fa3e1fed6ab4558e0e7d9a.zip
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/mos7840.c')
-rw-r--r--drivers/usb/serial/mos7840.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 30c25ef0dacd..1bf0d066f55a 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1745,7 +1745,7 @@ error:
return status;
}
-static int mos7840_port_remove(struct usb_serial_port *port)
+static void mos7840_port_remove(struct usb_serial_port *port)
{
struct moschip_port *mos7840_port = usb_get_serial_port_data(port);
@@ -1762,8 +1762,6 @@ static int mos7840_port_remove(struct usb_serial_port *port)
}
kfree(mos7840_port);
-
- return 0;
}
static struct usb_serial_driver moschip7840_4port_device = {