aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
diff options
context:
space:
mode:
authorNaranjo Manuel Francisco <naranjo.manuel@gmail.com>2006-11-15 13:14:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:23:35 -0500
commit7a5c7b42d3c7b1e0085d48414ee73003d3888d1f (patch)
treeac23aa6a0c81e9e79b5788e81ac6c9f84cc5d17b /drivers/usb/serial/aircable.c
parent1b7be3c066ae9238996a7a861b39b0bfd5860735 (diff)
USB: fix aircable.c: inconsequent NULL checking
> 2006/11/11, Adrian Bunk <bunk@stusta.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. Signed-off-by: Naranjo Manuel <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r--drivers/usb/serial/aircable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 8554c1a7b9fc..b1b5707bc99a 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -270,8 +270,11 @@ static void aircable_read(void *params)
270 */ 270 */
271 tty = port->tty; 271 tty = port->tty;
272 272
273 if (!tty) 273 if (!tty) {
274 schedule_work(&priv->rx_work); 274 schedule_work(&priv->rx_work);
275 err("%s - No tty available", __FUNCTION__);
276 return ;
277 }
275 278
276 count = min(64, serial_buf_data_avail(priv->rx_buf)); 279 count = min(64, serial_buf_data_avail(priv->rx_buf));
277 280