[media] media: fix null pointer dereference in v4l_vb2q_enable_media_source()
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 4 Mar 2016 02:24:58 +0000 (23:24 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 5 Mar 2016 11:18:21 +0000 (08:18 -0300)
commit7e53898a761d192f0ee3e6d6a5dfef0532212754
treeeccf1802801cd9f375f6424dd5a877290e222027
parent1e89f58499f3351a3b3c61dae8213fe3cd24a476
[media] media: fix null pointer dereference in v4l_vb2q_enable_media_source()

Fix the null pointer dereference in v4l_vb2q_enable_media_source().
DVB only drivers don't have valid struct v4l2_fh pointer.

[  548.443272] BUG: unable to handle kernel NULL pointer dereference
at 0000000000000010
[  548.452036] IP: [<ffffffffc020ffc9>]
v4l_vb2q_enable_media_source+0x9/0x50 [videodev]
[  548.460792] PGD b820e067 PUD bb3df067 PMD 0
[  548.465582] Oops: 0000 [#1] SMP

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reported-by: Olli Salonen <olli.salonen@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-mc.c