diff options
author | Dan Carpenter <error27@gmail.com> | 2011-01-03 08:44:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-21 23:14:47 +0300 |
commit | 2591418bb18ea597dc34cc369899e11c3d4ecc87 (patch) | |
tree | 60b2869c3c080781169530dd1458e441342a0812 /drivers/staging/tm6000 | |
parent | b01627c608d97b5246eb7a4b75c40f2a1fb4dc30 (diff) | |
download | linux-2591418bb18ea597dc34cc369899e11c3d4ecc87.tar.xz |
Staging: tm6000: check usb_alloc_urb() return
usb_alloc_urb() can return NULL so check for that and return
-ENOMEM if it happens.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tm6000')
-rw-r--r-- | drivers/staging/tm6000/tm6000-input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c index 01fcbbe38409..dae2f1fdcc5b 100644 --- a/drivers/staging/tm6000/tm6000-input.c +++ b/drivers/staging/tm6000/tm6000-input.c @@ -313,6 +313,8 @@ int tm6000_ir_int_start(struct tm6000_core *dev) return -ENODEV; ir->int_urb = usb_alloc_urb(0, GFP_KERNEL); + if (!ir->int_urb) + return -ENOMEM; pipe = usb_rcvintpipe(dev->udev, dev->int_in.endp->desc.bEndpointAddress |