diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-urb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-urb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c index 5cef12a07f72..6fe71c6745eb 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c | |||
@@ -13,14 +13,14 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, | |||
13 | { | 13 | { |
14 | int actlen,ret = -ENOMEM; | 14 | int actlen,ret = -ENOMEM; |
15 | 15 | ||
16 | if (!d || wbuf == NULL || wlen == 0) | ||
17 | return -EINVAL; | ||
18 | |||
16 | if (d->props.generic_bulk_ctrl_endpoint == 0) { | 19 | if (d->props.generic_bulk_ctrl_endpoint == 0) { |
17 | err("endpoint for generic control not specified."); | 20 | err("endpoint for generic control not specified."); |
18 | return -EINVAL; | 21 | return -EINVAL; |
19 | } | 22 | } |
20 | 23 | ||
21 | if (wbuf == NULL || wlen == 0) | ||
22 | return -EINVAL; | ||
23 | |||
24 | if ((ret = mutex_lock_interruptible(&d->usb_mutex))) | 24 | if ((ret = mutex_lock_interruptible(&d->usb_mutex))) |
25 | return ret; | 25 | return ret; |
26 | 26 | ||