Skip to content

Commit

Permalink
USB: zte_ev: fix broken open
Browse files Browse the repository at this point in the history
Remove bogus port-number check in open and close, which prevented this
driver from being used with a minor number different from zero.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jun 4, 2013
1 parent 8a2f132 commit d8a1d0d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/usb/serial/zte_ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
int len;
unsigned char *buf;

if (port->number != 0)
return -ENODEV;

buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL);
if (!buf)
return -ENOMEM;
Expand Down Expand Up @@ -166,9 +163,6 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
int len;
unsigned char *buf;

if (port->number != 0)
return;

buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL);
if (!buf)
return;
Expand Down

0 comments on commit d8a1d0d

Please sign in to comment.