diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 15:28:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 15:56:48 -0500 |
commit | 7e16e3fe1b3a6ae88e403e6898ddc46be063dbef (patch) | |
tree | 2d35eae4da7ea6709aefe37eb34d066b77f40509 | |
parent | f4df95bcbb7b142bdb4cf201f5e1bd3985f8c804 (diff) |
[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 <fengguang.wu@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-audio.c | 6 |
1 files changed, 0 insertions, 6 deletions
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) | |||
439 | dev_dbg(dev->dev, | 439 | dev_dbg(dev->dev, |
440 | "opening device and trying to acquire exclusive lock\n"); | 440 | "opening device and trying to acquire exclusive lock\n"); |
441 | 441 | ||
442 | if (!dev) { | ||
443 | dev_err(dev->dev, | ||
444 | "BUG: cx231xx can't find device struct. Can't proceed with open\n"); | ||
445 | return -ENODEV; | ||
446 | } | ||
447 | |||
448 | if (dev->state & DEV_DISCONNECTED) { | 442 | if (dev->state & DEV_DISCONNECTED) { |
449 | dev_err(dev->dev, | 443 | dev_err(dev->dev, |
450 | "Can't open. the device was removed.\n"); | 444 | "Can't open. the device was removed.\n"); |