diff options
author | Huzaifa Sidhpurwala <huzaifas@redhat.com> | 2011-02-21 02:28:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-25 14:33:01 -0500 |
commit | d866150a1914453c3d57689adfd8d01bf741d9d4 (patch) | |
tree | c889fb3dfd8cbc48e888c49a3e620a3a756a69a9 /drivers/usb/serial | |
parent | 108be95f9ffc53660c9a35b5ceef94121b1e23c4 (diff) |
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>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/keyspan.c | 10 |
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, | |||
2121 | /* Work out which port within the device is being setup */ | 2121 | /* Work out which port within the device is being setup */ |
2122 | device_port = port->number - port->serial->minor; | 2122 | device_port = port->number - port->serial->minor; |
2123 | 2123 | ||
2124 | dbg("%s - endpoint %d port %d (%d)", | 2124 | /* Make sure we have an urb then send the message */ |
2125 | __func__, usb_pipeendpoint(this_urb->pipe), | ||
2126 | port->number, device_port); | ||
2127 | |||
2128 | /* Make sure we have an urb then send the message */ | ||
2129 | if (this_urb == NULL) { | 2125 | if (this_urb == NULL) { |
2130 | dbg("%s - oops no urb for port %d.", __func__, port->number); | 2126 | dbg("%s - oops no urb for port %d.", __func__, port->number); |
2131 | return -1; | 2127 | return -1; |
2132 | } | 2128 | } |
2133 | 2129 | ||
2130 | dbg("%s - endpoint %d port %d (%d)", | ||
2131 | __func__, usb_pipeendpoint(this_urb->pipe), | ||
2132 | port->number, device_port); | ||
2133 | |||
2134 | /* Save reset port val for resend. | 2134 | /* Save reset port val for resend. |
2135 | Don't overwrite resend for open/close condition. */ | 2135 | Don't overwrite resend for open/close condition. */ |
2136 | if ((reset_port + 1) > p_priv->resend_cont) | 2136 | if ((reset_port + 1) > p_priv->resend_cont) |