Skip to content

Commit

Permalink
USB: serial: mos7840: remove unused write URB
Browse files Browse the repository at this point in the history
Remove code to manage a write URB that was never allocated.

Signed-off-by: Johan Hovold <[email protected]>
  • Loading branch information
jhovold committed Jan 4, 2017
1 parent 5c75633 commit fc43e65
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ MODULE_DEVICE_TABLE(usb, id_table);

struct moschip_port {
int port_num; /*Actual port number in the device(1,2,etc) */
struct urb *write_urb; /* write URB for this port */
struct urb *read_urb; /* read URB for this port */
__u8 shadowLCR; /* last LCR value received */
__u8 shadowMCR; /* last MCR value received */
Expand Down Expand Up @@ -1186,7 +1185,6 @@ static void mos7840_close(struct usb_serial_port *port)
}
}

usb_kill_urb(mos7840_port->write_urb);
usb_kill_urb(mos7840_port->read_urb);
mos7840_port->read_urb_busy = false;

Expand All @@ -1199,12 +1197,6 @@ static void mos7840_close(struct usb_serial_port *port)
}
}

if (mos7840_port->write_urb) {
/* if this urb had a transfer buffer already (old tx) free it */
kfree(mos7840_port->write_urb->transfer_buffer);
usb_free_urb(mos7840_port->write_urb);
}

Data = 0x0;
mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);

Expand Down

0 comments on commit fc43e65

Please sign in to comment.