Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e16e3fe authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[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: default avatarkbuild test robot <fengguang.wu@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent f4df95bc
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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");