[media] cx231xx: Remove a bogus check for NULL
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 3 Nov 2014 20:28:32 +0000 (18:28 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 3 Nov 2014 20:56:48 +0000 (18:56 -0200)
As reported by kbuild test robot:
drivers/media/usb/cx231xx/cx231xx-audio.c:445:16-20: ERROR: dev is NULL but dereferenced.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/cx231xx/cx231xx-audio.c

index 6d9a03402faf251ceaf13a9a4c0b50855f50c7b6..de4ae5eb4830bc4ce6c5c1513bf7f3b29bfa09a6 100644 (file)
@@ -439,12 +439,6 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream)
        dev_dbg(dev->dev,
                "opening device and trying to acquire exclusive lock\n");
 
-       if (!dev) {
-               dev_err(dev->dev,
-                       "BUG: cx231xx can't find device struct. Can't proceed with open\n");
-               return -ENODEV;
-       }
-
        if (dev->state & DEV_DISCONNECTED) {
                dev_err(dev->dev,
                        "Can't open. the device was removed.\n");