Skip to content

Commit

Permalink
USB: serial: keyspan: Fix possible null pointer dereference.
Browse files Browse the repository at this point in the history
Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Huzaifa Sidhpurwala authored and Greg Kroah-Hartman committed Feb 25, 2011
1 parent 108be95 commit d866150
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/usb/serial/keyspan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d866150

Please sign in to comment.