From 43eab8615c1bab7063f4a240ed1e203e1ab6b44d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Apr 2004 00:37:52 -0700 Subject: [PATCH] USB: fix empty write issue in pl2303 driver. Patch originally from Christian Groessler but cleaned up by me. --- drivers/usb/serial/pl2303.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index b5b04061d5abc..81f712cdd3739 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -213,6 +213,9 @@ static int pl2303_write (struct usb_serial_port *port, int from_user, const uns dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); + if (!count) + return count; + if (port->write_urb->status == -EINPROGRESS) { dbg("%s - already writing", __FUNCTION__); return 0; -- 2.53.0