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

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

Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Huzaifa Sidhpurwala and committed by
Greg Kroah-Hartman
d866150a 108be95f

+5 -5
+5 -5
drivers/usb/serial/keyspan.c
··· 2121 2121 /* Work out which port within the device is being setup */ 2122 2122 device_port = port->number - port->serial->minor; 2123 2123 2124 - dbg("%s - endpoint %d port %d (%d)", 2125 - __func__, usb_pipeendpoint(this_urb->pipe), 2126 - port->number, device_port); 2127 - 2128 - /* Make sure we have an urb then send the message */ 2124 + /* Make sure we have an urb then send the message */ 2129 2125 if (this_urb == NULL) { 2130 2126 dbg("%s - oops no urb for port %d.", __func__, port->number); 2131 2127 return -1; 2132 2128 } 2129 + 2130 + dbg("%s - endpoint %d port %d (%d)", 2131 + __func__, usb_pipeendpoint(this_urb->pipe), 2132 + port->number, device_port); 2133 2133 2134 2134 /* Save reset port val for resend. 2135 2135 Don't overwrite resend for open/close condition. */