* [patch 1/2] Staging: tm6000: check usb_alloc_urb() return
@ 2011-01-03 5:44 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-01-03 5:44 UTC (permalink / raw)
To: kernel-janitors
usb_alloc_urb() can return NULL so check for that and return
-ENOMEM if it happens.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c
index 21e7da4..aee5e85 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-03 5:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 5:44 [patch 1/2] Staging: tm6000: check usb_alloc_urb() return Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox