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

USB: serial: iuu_phoenix: drop excessive sanity checks

The transfer buffers and URBs are allocated and initialised by USB
serial core during probe, and there's no need to check for NULL transfer
buffers in the bulk-in completion handlers.

Signed-off-by: Johan Hovold <johan@kernel.org>

+3 -6
+3 -6
drivers/usb/serial/iuu_phoenix.c
··· 588 588 } 589 589 590 590 dev_dbg(&port->dev, "%s - %i chars to write\n", __func__, urb->actual_length); 591 - if (data == NULL) 592 - dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__); 593 - if (urb->actual_length && data) { 591 + 592 + if (urb->actual_length) { 594 593 tty_insert_flip_string(&port->port, data, urb->actual_length); 595 594 tty_flip_buffer_push(&port->port); 596 595 } ··· 654 655 /* error stop all */ 655 656 return; 656 657 } 657 - if (data == NULL) 658 - dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__); 659 658 660 - if (urb->actual_length == 1 && data != NULL) 659 + if (urb->actual_length == 1) 661 660 len = (int) data[0]; 662 661 663 662 if (urb->actual_length > 1) {