diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 14:32:26 -0300 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-11-28 07:49:19 -0800 |
commit | 687e6ad9f5edd1c91a75532d4996bcb613a85f29 (patch) | |
tree | 93108dbcee924da3407860cd9cc55bd357373789 /drivers | |
parent | b9051c938e69cef56cdfbb663c582703655d99a0 (diff) | |
download | linux-3.10-687e6ad9f5edd1c91a75532d4996bcb613a85f29.tar.gz linux-3.10-687e6ad9f5edd1c91a75532d4996bcb613a85f29.tar.bz2 linux-3.10-687e6ad9f5edd1c91a75532d4996bcb613a85f29.zip |
dmxdev: don't use before checking file->private_data
As reported by smatch:
drivers/media/dvb-core/dmxdev.c:1091 dvb_demux_poll() warn: variable dereferenced before check 'dmxdevfilter' (see line 1088)
This was introduced by changeset d102cac8097c.
We need to test before using it.
Change-Id: I4e51d508c466b915338bd0a88a7afb49f4dbeb4d
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-core/dmxdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c index 42b5e70d5ca..abff803ad69 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -1085,10 +1085,9 @@ static long dvb_demux_ioctl(struct file *file, unsigned int cmd, static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) { struct dmxdev_filter *dmxdevfilter = file->private_data; - struct dmxdev *dmxdev = dmxdevfilter->dev; unsigned int mask = 0; - if ((!dmxdevfilter) || (dmxdev->exit)) + if ((!dmxdevfilter) || dmxdevfilter->dev->exit) return POLLERR; poll_wait(file, &dmxdevfilter->buffer.queue, wait); |