summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>2011-02-21 08:28:44 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-25 20:33:01 +0100
commitd866150a1914453c3d57689adfd8d01bf741d9d4 (patch)
treec889fb3dfd8cbc48e888c49a3e620a3a756a69a9
parentusb: m66592-udc: Fixed bufnum of Bulk (diff)
downloadlinux-d866150a1914453c3d57689adfd8d01bf741d9d4.tar.xz
linux-d866150a1914453c3d57689adfd8d01bf741d9d4.zip
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>
-rw-r--r--drivers/usb/serial/keyspan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 0791778a66f3..67f41b526570 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -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)