提交 d8a1d0d5 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: zte_ev: fix broken open

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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8a2f132a
...@@ -41,9 +41,6 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, ...@@ -41,9 +41,6 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
int len; int len;
unsigned char *buf; unsigned char *buf;
if (port->number != 0)
return -ENODEV;
buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL);
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
...@@ -166,9 +163,6 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) ...@@ -166,9 +163,6 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
int len; int len;
unsigned char *buf; unsigned char *buf;
if (port->number != 0)
return;
buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL);
if (!buf) if (!buf)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册