“49edd098e298b1f94748b7eb9c76374eeca7fb93”上不存在“arch/mips/include/asm/system.h”
提交 7aac5e7d 编写于 作者: J Johan Hovold

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: NJohan Hovold <johan@kernel.org>
上级 e1fdd5b2
...@@ -588,9 +588,8 @@ static void read_buf_callback(struct urb *urb) ...@@ -588,9 +588,8 @@ static void read_buf_callback(struct urb *urb)
} }
dev_dbg(&port->dev, "%s - %i chars to write\n", __func__, urb->actual_length); dev_dbg(&port->dev, "%s - %i chars to write\n", __func__, urb->actual_length);
if (data == NULL)
dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__); if (urb->actual_length) {
if (urb->actual_length && data) {
tty_insert_flip_string(&port->port, data, urb->actual_length); tty_insert_flip_string(&port->port, data, urb->actual_length);
tty_flip_buffer_push(&port->port); tty_flip_buffer_push(&port->port);
} }
...@@ -655,10 +654,8 @@ static void iuu_uart_read_callback(struct urb *urb) ...@@ -655,10 +654,8 @@ static void iuu_uart_read_callback(struct urb *urb)
/* error stop all */ /* error stop all */
return; return;
} }
if (data == NULL)
dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__);
if (urb->actual_length == 1 && data != NULL) if (urb->actual_length == 1)
len = (int) data[0]; len = (int) data[0];
if (urb->actual_length > 1) { if (urb->actual_length > 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册