Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Uwe Kleine-König and committed by
Johan Hovold
c5d1448f a54af1b7

+53 -120
+1 -3
drivers/usb/serial/ark3116.c
··· 178 178 return 0; 179 179 } 180 180 181 - static int ark3116_port_remove(struct usb_serial_port *port) 181 + static void ark3116_port_remove(struct usb_serial_port *port) 182 182 { 183 183 struct ark3116_private *priv = usb_get_serial_port_data(port); 184 184 185 185 /* device is closed, so URBs and DMA should be down */ 186 186 mutex_destroy(&priv->hw_lock); 187 187 kfree(priv); 188 - 189 - return 0; 190 188 } 191 189 192 190 static void ark3116_set_termios(struct tty_struct *tty,
+2 -4
drivers/usb/serial/belkin_sa.c
··· 37 37 38 38 /* function prototypes for a Belkin USB Serial Adapter F5U103 */ 39 39 static int belkin_sa_port_probe(struct usb_serial_port *port); 40 - static int belkin_sa_port_remove(struct usb_serial_port *port); 40 + static void belkin_sa_port_remove(struct usb_serial_port *port); 41 41 static int belkin_sa_open(struct tty_struct *tty, 42 42 struct usb_serial_port *port); 43 43 static void belkin_sa_close(struct usb_serial_port *port); ··· 134 134 return 0; 135 135 } 136 136 137 - static int belkin_sa_port_remove(struct usb_serial_port *port) 137 + static void belkin_sa_port_remove(struct usb_serial_port *port) 138 138 { 139 139 struct belkin_sa_private *priv; 140 140 141 141 priv = usb_get_serial_port_data(port); 142 142 kfree(priv); 143 - 144 - return 0; 145 143 } 146 144 147 145 static int belkin_sa_open(struct tty_struct *tty,
+2 -3
drivers/usb/serial/bus.c
··· 88 88 { 89 89 struct usb_serial_port *port = to_usb_serial_port(dev); 90 90 struct usb_serial_driver *driver; 91 - int retval = 0; 92 91 int minor; 93 92 int autopm_err; 94 93 ··· 104 105 105 106 driver = port->serial->type; 106 107 if (driver->port_remove) 107 - retval = driver->port_remove(port); 108 + driver->port_remove(port); 108 109 109 110 dev_info(dev, "%s converter now disconnected from ttyUSB%d\n", 110 111 driver->description, minor); ··· 112 113 if (!autopm_err) 113 114 usb_autopm_put_interface(port->serial->interface); 114 115 115 - return retval; 116 + return 0; 116 117 } 117 118 118 119 static ssize_t new_id_store(struct device_driver *driver,
+1 -3
drivers/usb/serial/ch341.c
··· 419 419 return r; 420 420 } 421 421 422 - static int ch341_port_remove(struct usb_serial_port *port) 422 + static void ch341_port_remove(struct usb_serial_port *port) 423 423 { 424 424 struct ch341_private *priv; 425 425 426 426 priv = usb_get_serial_port_data(port); 427 427 kfree(priv); 428 - 429 - return 0; 430 428 } 431 429 432 430 static int ch341_carrier_raised(struct usb_serial_port *port)
+2 -4
drivers/usb/serial/cp210x.c
··· 44 44 static void cp210x_disconnect(struct usb_serial *); 45 45 static void cp210x_release(struct usb_serial *); 46 46 static int cp210x_port_probe(struct usb_serial_port *); 47 - static int cp210x_port_remove(struct usb_serial_port *); 47 + static void cp210x_port_remove(struct usb_serial_port *); 48 48 static void cp210x_dtr_rts(struct usb_serial_port *port, int on); 49 49 static void cp210x_process_read_urb(struct urb *urb); 50 50 static void cp210x_enable_event_mode(struct usb_serial_port *port); ··· 1841 1841 return 0; 1842 1842 } 1843 1843 1844 - static int cp210x_port_remove(struct usb_serial_port *port) 1844 + static void cp210x_port_remove(struct usb_serial_port *port) 1845 1845 { 1846 1846 struct cp210x_port_private *port_priv; 1847 1847 1848 1848 port_priv = usb_get_serial_port_data(port); 1849 1849 kfree(port_priv); 1850 - 1851 - return 0; 1852 1850 } 1853 1851 1854 1852 static void cp210x_init_max_speed(struct usb_serial *serial)
+2 -4
drivers/usb/serial/cyberjack.c
··· 47 47 48 48 /* Function prototypes */ 49 49 static int cyberjack_port_probe(struct usb_serial_port *port); 50 - static int cyberjack_port_remove(struct usb_serial_port *port); 50 + static void cyberjack_port_remove(struct usb_serial_port *port); 51 51 static int cyberjack_open(struct tty_struct *tty, 52 52 struct usb_serial_port *port); 53 53 static void cyberjack_close(struct usb_serial_port *port); ··· 120 120 return 0; 121 121 } 122 122 123 - static int cyberjack_port_remove(struct usb_serial_port *port) 123 + static void cyberjack_port_remove(struct usb_serial_port *port) 124 124 { 125 125 struct cyberjack_private *priv; 126 126 ··· 128 128 129 129 priv = usb_get_serial_port_data(port); 130 130 kfree(priv); 131 - 132 - return 0; 133 131 } 134 132 135 133 static int cyberjack_open(struct tty_struct *tty,
+2 -4
drivers/usb/serial/cypress_m8.c
··· 115 115 static int cypress_earthmate_port_probe(struct usb_serial_port *port); 116 116 static int cypress_hidcom_port_probe(struct usb_serial_port *port); 117 117 static int cypress_ca42v2_port_probe(struct usb_serial_port *port); 118 - static int cypress_port_remove(struct usb_serial_port *port); 118 + static void cypress_port_remove(struct usb_serial_port *port); 119 119 static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port); 120 120 static void cypress_close(struct usb_serial_port *port); 121 121 static void cypress_dtr_rts(struct usb_serial_port *port, int on); ··· 564 564 return 0; 565 565 } 566 566 567 - static int cypress_port_remove(struct usb_serial_port *port) 567 + static void cypress_port_remove(struct usb_serial_port *port) 568 568 { 569 569 struct cypress_private *priv; 570 570 ··· 572 572 573 573 kfifo_free(&priv->write_fifo); 574 574 kfree(priv); 575 - 576 - return 0; 577 575 } 578 576 579 577 static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
+2 -4
drivers/usb/serial/digi_acceleport.c
··· 233 233 static void digi_disconnect(struct usb_serial *serial); 234 234 static void digi_release(struct usb_serial *serial); 235 235 static int digi_port_probe(struct usb_serial_port *port); 236 - static int digi_port_remove(struct usb_serial_port *port); 236 + static void digi_port_remove(struct usb_serial_port *port); 237 237 static void digi_read_bulk_callback(struct urb *urb); 238 238 static int digi_read_inb_callback(struct urb *urb); 239 239 static int digi_read_oob_callback(struct urb *urb); ··· 1281 1281 return digi_port_init(port, port->port_number); 1282 1282 } 1283 1283 1284 - static int digi_port_remove(struct usb_serial_port *port) 1284 + static void digi_port_remove(struct usb_serial_port *port) 1285 1285 { 1286 1286 struct digi_port *priv; 1287 1287 1288 1288 priv = usb_get_serial_port_data(port); 1289 1289 kfree(priv); 1290 - 1291 - return 0; 1292 1290 } 1293 1291 1294 1292 static void digi_read_bulk_callback(struct urb *urb)
+1 -2
drivers/usb/serial/f81534.c
··· 1430 1430 return f81534_set_port_output_pin(port); 1431 1431 } 1432 1432 1433 - static int f81534_port_remove(struct usb_serial_port *port) 1433 + static void f81534_port_remove(struct usb_serial_port *port) 1434 1434 { 1435 1435 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); 1436 1436 1437 1437 flush_work(&port_priv->lsr_work); 1438 - return 0; 1439 1438 } 1440 1439 1441 1440 static int f81534_tiocmget(struct tty_struct *tty)
+2 -4
drivers/usb/serial/ftdi_sio.c
··· 1069 1069 static int ftdi_sio_probe(struct usb_serial *serial, 1070 1070 const struct usb_device_id *id); 1071 1071 static int ftdi_sio_port_probe(struct usb_serial_port *port); 1072 - static int ftdi_sio_port_remove(struct usb_serial_port *port); 1072 + static void ftdi_sio_port_remove(struct usb_serial_port *port); 1073 1073 static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port); 1074 1074 static void ftdi_dtr_rts(struct usb_serial_port *port, int on); 1075 1075 static void ftdi_process_read_urb(struct urb *urb); ··· 2400 2400 return 0; 2401 2401 } 2402 2402 2403 - static int ftdi_sio_port_remove(struct usb_serial_port *port) 2403 + static void ftdi_sio_port_remove(struct usb_serial_port *port) 2404 2404 { 2405 2405 struct ftdi_private *priv = usb_get_serial_port_data(port); 2406 2406 ··· 2409 2409 remove_sysfs_attrs(port); 2410 2410 2411 2411 kfree(priv); 2412 - 2413 - return 0; 2414 2412 } 2415 2413 2416 2414 static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
+1 -2
drivers/usb/serial/garmin_gps.c
··· 1401 1401 } 1402 1402 1403 1403 1404 - static int garmin_port_remove(struct usb_serial_port *port) 1404 + static void garmin_port_remove(struct usb_serial_port *port) 1405 1405 { 1406 1406 struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); 1407 1407 ··· 1409 1409 usb_kill_urb(port->interrupt_in_urb); 1410 1410 del_timer_sync(&garmin_data_p->timer); 1411 1411 kfree(garmin_data_p); 1412 - return 0; 1413 1412 } 1414 1413 1415 1414
+2 -4
drivers/usb/serial/io_edgeport.c
··· 293 293 static void edge_disconnect(struct usb_serial *serial); 294 294 static void edge_release(struct usb_serial *serial); 295 295 static int edge_port_probe(struct usb_serial_port *port); 296 - static int edge_port_remove(struct usb_serial_port *port); 296 + static void edge_port_remove(struct usb_serial_port *port); 297 297 298 298 /* function prototypes for all of our local functions */ 299 299 ··· 3078 3078 return 0; 3079 3079 } 3080 3080 3081 - static int edge_port_remove(struct usb_serial_port *port) 3081 + static void edge_port_remove(struct usb_serial_port *port) 3082 3082 { 3083 3083 struct edgeport_port *edge_port; 3084 3084 3085 3085 edge_port = usb_get_serial_port_data(port); 3086 3086 kfree(edge_port); 3087 - 3088 - return 0; 3089 3087 } 3090 3088 3091 3089 static struct usb_serial_driver edgeport_2port_device = {
+1 -3
drivers/usb/serial/io_ti.c
··· 2625 2625 return ret; 2626 2626 } 2627 2627 2628 - static int edge_port_remove(struct usb_serial_port *port) 2628 + static void edge_port_remove(struct usb_serial_port *port) 2629 2629 { 2630 2630 struct edgeport_port *edge_port; 2631 2631 2632 2632 edge_port = usb_get_serial_port_data(port); 2633 2633 edge_remove_sysfs_attrs(port); 2634 2634 kfree(edge_port); 2635 - 2636 - return 0; 2637 2635 } 2638 2636 2639 2637 /* Sysfs Attributes */
+1 -3
drivers/usb/serial/iuu_phoenix.c
··· 100 100 return 0; 101 101 } 102 102 103 - static int iuu_port_remove(struct usb_serial_port *port) 103 + static void iuu_port_remove(struct usb_serial_port *port) 104 104 { 105 105 struct iuu_private *priv = usb_get_serial_port_data(port); 106 106 ··· 108 108 kfree(priv->writebuf); 109 109 kfree(priv->buf); 110 110 kfree(priv); 111 - 112 - return 0; 113 111 } 114 112 115 113 static int iuu_tiocmset(struct tty_struct *tty,
+2 -4
drivers/usb/serial/keyspan.c
··· 49 49 static void keyspan_disconnect(struct usb_serial *serial); 50 50 static void keyspan_release(struct usb_serial *serial); 51 51 static int keyspan_port_probe(struct usb_serial_port *port); 52 - static int keyspan_port_remove(struct usb_serial_port *port); 52 + static void keyspan_port_remove(struct usb_serial_port *port); 53 53 static int keyspan_write_room(struct tty_struct *tty); 54 54 static int keyspan_write(struct tty_struct *tty, struct usb_serial_port *port, 55 55 const unsigned char *buf, int count); ··· 2985 2985 return -ENOMEM; 2986 2986 } 2987 2987 2988 - static int keyspan_port_remove(struct usb_serial_port *port) 2988 + static void keyspan_port_remove(struct usb_serial_port *port) 2989 2989 { 2990 2990 struct keyspan_port_private *p_priv; 2991 2991 int i; ··· 3014 3014 kfree(p_priv->in_buffer[i]); 3015 3015 3016 3016 kfree(p_priv); 3017 - 3018 - return 0; 3019 3017 } 3020 3018 3021 3019 /* Structs for the devices, pre and post renumeration. */
+1 -3
drivers/usb/serial/keyspan_pda.c
··· 672 672 return 0; 673 673 } 674 674 675 - static int keyspan_pda_port_remove(struct usb_serial_port *port) 675 + static void keyspan_pda_port_remove(struct usb_serial_port *port) 676 676 { 677 677 struct keyspan_pda_private *priv; 678 678 679 679 priv = usb_get_serial_port_data(port); 680 680 kfree(priv); 681 - 682 - return 0; 683 681 } 684 682 685 683 static struct usb_serial_driver keyspan_pda_fake_device = {
+2 -4
drivers/usb/serial/kl5kusb105.c
··· 52 52 * Function prototypes 53 53 */ 54 54 static int klsi_105_port_probe(struct usb_serial_port *port); 55 - static int klsi_105_port_remove(struct usb_serial_port *port); 55 + static void klsi_105_port_remove(struct usb_serial_port *port); 56 56 static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port); 57 57 static void klsi_105_close(struct usb_serial_port *port); 58 58 static void klsi_105_set_termios(struct tty_struct *tty, ··· 231 231 return 0; 232 232 } 233 233 234 - static int klsi_105_port_remove(struct usb_serial_port *port) 234 + static void klsi_105_port_remove(struct usb_serial_port *port) 235 235 { 236 236 struct klsi_105_private *priv; 237 237 238 238 priv = usb_get_serial_port_data(port); 239 239 kfree(priv); 240 - 241 - return 0; 242 240 } 243 241 244 242 static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
+2 -4
drivers/usb/serial/kobil_sct.c
··· 48 48 49 49 /* Function prototypes */ 50 50 static int kobil_port_probe(struct usb_serial_port *probe); 51 - static int kobil_port_remove(struct usb_serial_port *probe); 51 + static void kobil_port_remove(struct usb_serial_port *probe); 52 52 static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port); 53 53 static void kobil_close(struct usb_serial_port *port); 54 54 static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, ··· 143 143 } 144 144 145 145 146 - static int kobil_port_remove(struct usb_serial_port *port) 146 + static void kobil_port_remove(struct usb_serial_port *port) 147 147 { 148 148 struct kobil_private *priv; 149 149 150 150 priv = usb_get_serial_port_data(port); 151 151 kfree(priv); 152 - 153 - return 0; 154 152 } 155 153 156 154 static void kobil_init_termios(struct tty_struct *tty)
+2 -4
drivers/usb/serial/mct_u232.c
··· 39 39 * Function prototypes 40 40 */ 41 41 static int mct_u232_port_probe(struct usb_serial_port *port); 42 - static int mct_u232_port_remove(struct usb_serial_port *remove); 42 + static void mct_u232_port_remove(struct usb_serial_port *remove); 43 43 static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port); 44 44 static void mct_u232_close(struct usb_serial_port *port); 45 45 static void mct_u232_dtr_rts(struct usb_serial_port *port, int on); ··· 400 400 return 0; 401 401 } 402 402 403 - static int mct_u232_port_remove(struct usb_serial_port *port) 403 + static void mct_u232_port_remove(struct usb_serial_port *port) 404 404 { 405 405 struct mct_u232_private *priv; 406 406 407 407 priv = usb_get_serial_port_data(port); 408 408 kfree(priv); 409 - 410 - return 0; 411 409 } 412 410 413 411 static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
+1 -3
drivers/usb/serial/metro-usb.c
··· 256 256 return 0; 257 257 } 258 258 259 - static int metrousb_port_remove(struct usb_serial_port *port) 259 + static void metrousb_port_remove(struct usb_serial_port *port) 260 260 { 261 261 struct metrousb_private *metro_priv; 262 262 263 263 metro_priv = usb_get_serial_port_data(port); 264 264 kfree(metro_priv); 265 - 266 - return 0; 267 265 } 268 266 269 267 static void metrousb_throttle(struct tty_struct *tty)
+1 -3
drivers/usb/serial/mos7720.c
··· 1760 1760 return 0; 1761 1761 } 1762 1762 1763 - static int mos7720_port_remove(struct usb_serial_port *port) 1763 + static void mos7720_port_remove(struct usb_serial_port *port) 1764 1764 { 1765 1765 struct moschip_port *mos7720_port; 1766 1766 1767 1767 mos7720_port = usb_get_serial_port_data(port); 1768 1768 kfree(mos7720_port); 1769 - 1770 - return 0; 1771 1769 } 1772 1770 1773 1771 static struct usb_serial_driver moschip7720_2port_driver = {
+1 -3
drivers/usb/serial/mos7840.c
··· 1745 1745 return status; 1746 1746 } 1747 1747 1748 - static int mos7840_port_remove(struct usb_serial_port *port) 1748 + static void mos7840_port_remove(struct usb_serial_port *port) 1749 1749 { 1750 1750 struct moschip_port *mos7840_port = usb_get_serial_port_data(port); 1751 1751 ··· 1762 1762 } 1763 1763 1764 1764 kfree(mos7840_port); 1765 - 1766 - return 0; 1767 1765 } 1768 1766 1769 1767 static struct usb_serial_driver moschip7840_4port_device = {
+2 -4
drivers/usb/serial/omninet.c
··· 36 36 static int omninet_calc_num_ports(struct usb_serial *serial, 37 37 struct usb_serial_endpoints *epds); 38 38 static int omninet_port_probe(struct usb_serial_port *port); 39 - static int omninet_port_remove(struct usb_serial_port *port); 39 + static void omninet_port_remove(struct usb_serial_port *port); 40 40 41 41 static const struct usb_device_id id_table[] = { 42 42 { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) }, ··· 121 121 return 0; 122 122 } 123 123 124 - static int omninet_port_remove(struct usb_serial_port *port) 124 + static void omninet_port_remove(struct usb_serial_port *port) 125 125 { 126 126 struct omninet_data *od; 127 127 128 128 od = usb_get_serial_port_data(port); 129 129 kfree(od); 130 - 131 - return 0; 132 130 } 133 131 134 132 #define OMNINET_HEADERLEN 4
+1 -3
drivers/usb/serial/opticon.c
··· 385 385 return 0; 386 386 } 387 387 388 - static int opticon_port_remove(struct usb_serial_port *port) 388 + static void opticon_port_remove(struct usb_serial_port *port) 389 389 { 390 390 struct opticon_private *priv = usb_get_serial_port_data(port); 391 391 392 392 kfree(priv); 393 - 394 - return 0; 395 393 } 396 394 397 395 static struct usb_serial_driver opticon_device = {
+2 -4
drivers/usb/serial/oti6858.c
··· 132 132 static int oti6858_tiocmset(struct tty_struct *tty, 133 133 unsigned int set, unsigned int clear); 134 134 static int oti6858_port_probe(struct usb_serial_port *port); 135 - static int oti6858_port_remove(struct usb_serial_port *port); 135 + static void oti6858_port_remove(struct usb_serial_port *port); 136 136 137 137 /* device info */ 138 138 static struct usb_serial_driver oti6858_device = { ··· 344 344 return 0; 345 345 } 346 346 347 - static int oti6858_port_remove(struct usb_serial_port *port) 347 + static void oti6858_port_remove(struct usb_serial_port *port) 348 348 { 349 349 struct oti6858_private *priv; 350 350 351 351 priv = usb_get_serial_port_data(port); 352 352 kfree(priv); 353 - 354 - return 0; 355 353 } 356 354 357 355 static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port,
+1 -3
drivers/usb/serial/pl2303.c
··· 450 450 return 0; 451 451 } 452 452 453 - static int pl2303_port_remove(struct usb_serial_port *port) 453 + static void pl2303_port_remove(struct usb_serial_port *port) 454 454 { 455 455 struct pl2303_private *priv = usb_get_serial_port_data(port); 456 456 457 457 kfree(priv); 458 - 459 - return 0; 460 458 } 461 459 462 460 static int pl2303_set_control_lines(struct usb_serial_port *port, u8 value)
+1 -3
drivers/usb/serial/quatech2.c
··· 727 727 return -ENOMEM; 728 728 } 729 729 730 - static int qt2_port_remove(struct usb_serial_port *port) 730 + static void qt2_port_remove(struct usb_serial_port *port) 731 731 { 732 732 struct qt2_port_private *port_priv; 733 733 ··· 735 735 usb_free_urb(port_priv->write_urb); 736 736 kfree(port_priv->write_buffer); 737 737 kfree(port_priv); 738 - 739 - return 0; 740 738 } 741 739 742 740 static int qt2_tiocmget(struct tty_struct *tty)
+1 -3
drivers/usb/serial/sierra.c
··· 901 901 return 0; 902 902 } 903 903 904 - static int sierra_port_remove(struct usb_serial_port *port) 904 + static void sierra_port_remove(struct usb_serial_port *port) 905 905 { 906 906 struct sierra_port_private *portdata; 907 907 908 908 portdata = usb_get_serial_port_data(port); 909 909 usb_set_serial_port_data(port, NULL); 910 910 kfree(portdata); 911 - 912 - return 0; 913 911 } 914 912 915 913 #ifdef CONFIG_PM
+1 -3
drivers/usb/serial/spcp8x5.c
··· 169 169 return 0; 170 170 } 171 171 172 - static int spcp8x5_port_remove(struct usb_serial_port *port) 172 + static void spcp8x5_port_remove(struct usb_serial_port *port) 173 173 { 174 174 struct spcp8x5_private *priv; 175 175 176 176 priv = usb_get_serial_port_data(port); 177 177 kfree(priv); 178 - 179 - return 0; 180 178 } 181 179 182 180 static int spcp8x5_set_ctrl_line(struct usb_serial_port *port, u8 mcr)
+1 -3
drivers/usb/serial/ssu100.c
··· 366 366 return 0; 367 367 } 368 368 369 - static int ssu100_port_remove(struct usb_serial_port *port) 369 + static void ssu100_port_remove(struct usb_serial_port *port) 370 370 { 371 371 struct ssu100_port_private *priv; 372 372 373 373 priv = usb_get_serial_port_data(port); 374 374 kfree(priv); 375 - 376 - return 0; 377 375 } 378 376 379 377 static int ssu100_tiocmget(struct tty_struct *tty)
+1 -3
drivers/usb/serial/symbolserial.c
··· 160 160 return 0; 161 161 } 162 162 163 - static int symbol_port_remove(struct usb_serial_port *port) 163 + static void symbol_port_remove(struct usb_serial_port *port) 164 164 { 165 165 struct symbol_private *priv = usb_get_serial_port_data(port); 166 166 167 167 kfree(priv); 168 - 169 - return 0; 170 168 } 171 169 172 170 static struct usb_serial_driver symbol_device = {
+2 -4
drivers/usb/serial/ti_usb_3410_5052.c
··· 303 303 static int ti_startup(struct usb_serial *serial); 304 304 static void ti_release(struct usb_serial *serial); 305 305 static int ti_port_probe(struct usb_serial_port *port); 306 - static int ti_port_remove(struct usb_serial_port *port); 306 + static void ti_port_remove(struct usb_serial_port *port); 307 307 static int ti_open(struct tty_struct *tty, struct usb_serial_port *port); 308 308 static void ti_close(struct usb_serial_port *port); 309 309 static int ti_write(struct tty_struct *tty, struct usb_serial_port *port, ··· 629 629 return 0; 630 630 } 631 631 632 - static int ti_port_remove(struct usb_serial_port *port) 632 + static void ti_port_remove(struct usb_serial_port *port) 633 633 { 634 634 struct ti_port *tport; 635 635 636 636 tport = usb_get_serial_port_data(port); 637 637 kfree(tport); 638 - 639 - return 0; 640 638 } 641 639 642 640 static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
+1 -3
drivers/usb/serial/upd78f0730.c
··· 171 171 return 0; 172 172 } 173 173 174 - static int upd78f0730_port_remove(struct usb_serial_port *port) 174 + static void upd78f0730_port_remove(struct usb_serial_port *port) 175 175 { 176 176 struct upd78f0730_port_private *private; 177 177 178 178 private = usb_get_serial_port_data(port); 179 179 mutex_destroy(&private->lock); 180 180 kfree(private); 181 - 182 - return 0; 183 181 } 184 182 185 183 static int upd78f0730_tiocmget(struct tty_struct *tty)
+1 -1
drivers/usb/serial/usb-wwan.h
··· 10 10 extern int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port); 11 11 extern void usb_wwan_close(struct usb_serial_port *port); 12 12 extern int usb_wwan_port_probe(struct usb_serial_port *port); 13 - extern int usb_wwan_port_remove(struct usb_serial_port *port); 13 + extern void usb_wwan_port_remove(struct usb_serial_port *port); 14 14 extern int usb_wwan_write_room(struct tty_struct *tty); 15 15 extern int usb_wwan_tiocmget(struct tty_struct *tty); 16 16 extern int usb_wwan_tiocmset(struct tty_struct *tty,
+1 -3
drivers/usb/serial/usb_wwan.c
··· 544 544 } 545 545 EXPORT_SYMBOL_GPL(usb_wwan_port_probe); 546 546 547 - int usb_wwan_port_remove(struct usb_serial_port *port) 547 + void usb_wwan_port_remove(struct usb_serial_port *port) 548 548 { 549 549 int i; 550 550 struct usb_wwan_port_private *portdata; ··· 562 562 } 563 563 564 564 kfree(portdata); 565 - 566 - return 0; 567 565 } 568 566 EXPORT_SYMBOL(usb_wwan_port_remove); 569 567
+2 -4
drivers/usb/serial/whiteheat.c
··· 79 79 static int whiteheat_attach(struct usb_serial *serial); 80 80 static void whiteheat_release(struct usb_serial *serial); 81 81 static int whiteheat_port_probe(struct usb_serial_port *port); 82 - static int whiteheat_port_remove(struct usb_serial_port *port); 82 + static void whiteheat_port_remove(struct usb_serial_port *port); 83 83 static int whiteheat_open(struct tty_struct *tty, 84 84 struct usb_serial_port *port); 85 85 static void whiteheat_close(struct usb_serial_port *port); ··· 345 345 return 0; 346 346 } 347 347 348 - static int whiteheat_port_remove(struct usb_serial_port *port) 348 + static void whiteheat_port_remove(struct usb_serial_port *port) 349 349 { 350 350 struct whiteheat_private *info; 351 351 352 352 info = usb_get_serial_port_data(port); 353 353 kfree(info); 354 - 355 - return 0; 356 354 } 357 355 358 356 static int whiteheat_open(struct tty_struct *tty, struct usb_serial_port *port)
+1 -1
include/linux/usb/serial.h
··· 260 260 void (*release)(struct usb_serial *serial); 261 261 262 262 int (*port_probe)(struct usb_serial_port *port); 263 - int (*port_remove)(struct usb_serial_port *port); 263 + void (*port_remove)(struct usb_serial_port *port); 264 264 265 265 int (*suspend)(struct usb_serial *serial, pm_message_t message); 266 266 int (*resume)(struct usb_serial *serial);