aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-20 09:03:38 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-20 09:03:38 +0100
commit90accd6fabf9b2fa2705945a4c601877a75d43bf (patch)
treed393cb54f0228b1313139e4e14adf4f5cf236b59 /drivers/media/dvb/dvb-usb/dvb-usb-urb.c
parentb43d196c4d3fe46d6dda7c987c47792612b80b1b (diff)
parentee2f6cc7f9ea2542ad46070ed62ba7aa04d08871 (diff)
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-urb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-urb.c6
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 5cef12a07f7..6fe71c6745e 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,
{
int actlen,ret = -ENOMEM;
+ if (!d || wbuf == NULL || wlen == 0)
+ return -EINVAL;
+
if (d->props.generic_bulk_ctrl_endpoint == 0) {
err("endpoint for generic control not specified.");
return -EINVAL;
}
- if (wbuf == NULL || wlen == 0)
- return -EINVAL;
-
if ((ret = mutex_lock_interruptible(&d->usb_mutex)))
return ret;