summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-08-21 11:19:13 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-02 15:46:50 -0300
commit206ace2288449008742c8ca65f1865e51e83e442 (patch)
tree7f4c3bc9df6b1824ff87c6391b312e40601fec6d /drivers/media/usb/dvb-usb-v2
parent5cd62db71dcf3a4722959d9f90ca4c5ca09502cb (diff)
downloadblackbird-op-linux-206ace2288449008742c8ca65f1865e51e83e442.tar.gz
blackbird-op-linux-206ace2288449008742c8ca65f1865e51e83e442.zip
[media] dvb-usb-v2: remove dvb_usb_device NULL check
Reported by Dan Carpenter: The patch d10d1b9ac97b: "[media] dvb_usb_v2: use dev_* logging macros" from Jun 26, 2012, leads to the following Smatch complaint: drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c:31 dvb_usb_v2_generic_io() error: we previously assumed 'd' could be null (see line 29) ... Remove whole check as it must not happen in any case. Driver is totally broken if it does not have valid pointer to device. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2')
-rw-r--r--drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c
index 33ff97e708e3..22bdce15ecf3 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c
@@ -26,7 +26,7 @@ static int dvb_usb_v2_generic_io(struct dvb_usb_device *d,
{
int ret, actual_length;
- if (!d || !wbuf || !wlen || !d->props->generic_bulk_ctrl_endpoint ||
+ if (!wbuf || !wlen || !d->props->generic_bulk_ctrl_endpoint ||
!d->props->generic_bulk_ctrl_endpoint_response) {
dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, -EINVAL);
return -EINVAL;
OpenPOWER on IntegriCloud