[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061115151427.47ffdd75@manuel>
Date: Wed, 15 Nov 2006 15:14:27 -0300
From: Naranjo Manuel Francisco <naranjo.manuel@...il.com>
To: <bunk@...sta.de>
Cc: gregkh@...e.de, linux-usb-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: drivers/usb/serial/aircable.c: inconsequent NULL checking
> 2006/11/11, Adrian Bunk <bunk@...sta.de>:
> > The Coverity checker spotted the following in
> > drivers/usb/serial/aircable.c:
> >
> > <-- snip -->
> >
> > ...
> > static void aircable_read(void *params)
> > {
> > ...
Hi everyone,
Sorry for the long time response but here is the patch, I think this way should work, if anyone has any suggestion let me know. What I do now is, in case I don't have the tty available I reschedule the work, I have tried it and it works with no problem, I even tried removing the device, and didn't find anything strange.
Manuel Naranjo
Signed-off-by: Naranjo Manuel <naranjo.manuel@...il.com>
----
--- linux2/drivers/usb/serial/aircable.c.orig 2006-11-15 15:03:40.000000000 -0300
+++ linux2/drivers/usb/serial/aircable.c 2006-11-12 21:59:05.000000000 -0300
@@ -270,8 +270,11 @@ static void aircable_read(void *params)
*/
tty = port->tty;
- if (!tty)
+ if (!tty){
schedule_work(&priv->rx_work);
+ err("%s - No tty available", __FUNCTION__);
+ return ;
+ }
count = min(64, serial_buf_data_avail(priv->rx_buf));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists