]> git.baikalelectronics.ru Git - kernel.git/commit
[media] cx88: fix NULL pointer dereference
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 29 May 2013 13:44:22 +0000 (10:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 8 Jun 2013 23:24:56 +0000 (20:24 -0300)
commit8ceefd99c54d47a3d13e266339ff8fdf55419633
tree31d41ee5768f3d3ef56ad0c4d8aa75fb12a41a22
parenta70eab3f5f803bdaa2c0d5eb119b21568e6d2b97
[media] cx88: fix NULL pointer dereference

This fixes a NULL pointer deference when loading the cx88_dvb module for a
Hauppauge HVR4000.
The bugzilla bug report is here:
https://bugzilla.kernel.org/show_bug.cgi?id=56271
The cause is that the wm8775 is optional, so even though the board info says
there is one, it doesn't have to be there. Checking whether the module was
actually loaded is much safer.
Note that this driver is quite buggy when it comes to unloading and reloading
modules. Unloading cx8800 and reloading it again will still cause a crash,
most likely because either the i2c bus isn't unloaded at the right time and/or
the v4l2_device_unregister isn't called at the right time.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Sebastian Frei <sebastian@familie-frei.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/cx88/cx88-alsa.c
drivers/media/pci/cx88/cx88-video.c