提交 2591418b 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b01627c6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册