From: Mauro Carvalho Chehab Date: Mon, 3 Nov 2014 20:28:32 +0000 (-0200) Subject: [media] cx231xx: Remove a bogus check for NULL X-Git-Tag: android-x86-4.4-r3~477^2~246 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7e16e3fe1b3a6ae88e403e6898ddc46be063dbef;p=android-x86%2Fkernel.git [media] cx231xx: Remove a bogus check for NULL 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 Reported-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c index 6d9a03402faf..de4ae5eb4830 100644 --- a/drivers/media/usb/cx231xx/cx231xx-audio.c +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c @@ -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");