提交 d866150a 编写于 作者: H Huzaifa Sidhpurwala 提交者: Greg Kroah-Hartman

USB: serial: keyspan: Fix possible null pointer dereference.

Signed-off-by: NHuzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 108be95f
......@@ -2121,16 +2121,16 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
/* Work out which port within the device is being setup */
device_port = port->number - port->serial->minor;
dbg("%s - endpoint %d port %d (%d)",
__func__, usb_pipeendpoint(this_urb->pipe),
port->number, device_port);
/* Make sure we have an urb then send the message */
/* Make sure we have an urb then send the message */
if (this_urb == NULL) {
dbg("%s - oops no urb for port %d.", __func__, port->number);
return -1;
}
dbg("%s - endpoint %d port %d (%d)",
__func__, usb_pipeendpoint(this_urb->pipe),
port->number, device_port);
/* Save reset port val for resend.
Don't overwrite resend for open/close condition. */
if ((reset_port + 1) > p_priv->resend_cont)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册