提交 e50af488 编写于 作者: G Guilherme G. Piccoli 提交者: Greg Kroah-Hartman

tty: serial: jsm: Add one check against NULL pointer dereference

All calls to neo_copy_data_from_uart_to_queue() are safeguarded
against NULL dereference of its parameter, except the one that
this patch changes.

That said, let's play safe and check for NULL in this case too.
Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8ca31ba8
...@@ -1172,6 +1172,9 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) ...@@ -1172,6 +1172,9 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
continue; continue;
ch = brd->channels[port]; ch = brd->channels[port];
if (!ch)
continue;
neo_copy_data_from_uart_to_queue(ch); neo_copy_data_from_uart_to_queue(ch);
/* Call our tty layer to enforce queue flow control if needed. */ /* Call our tty layer to enforce queue flow control if needed. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册