V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)
commit17e3749a4288672cf446fc792c5fe2a7a7e245b2
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 11 Sep 2010 14:37:51 +0000 (11 11:37 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:43:58 +0000 (28 21:43 -0700)
treeb8d9c9b57c72825f83892640b61662e15f91336c
parent71282d956c125a373debfc3539dfa3737647c691
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)

commit c10469c637602c2385e2993d8c730cc44fd47d23 upstream.

As reported by: Carlos Americo Domiciano <c_domiciano@yahoo.com.br>:

[  220.033500] cx231xx v4l2 driver loaded.
[  220.033571] cx231xx #0: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 6 interfaces
[  220.033577] cx231xx #0: registering interface 0
[  220.033591] cx231xx #0: registering interface 1
[  220.033654] cx231xx #0: registering interface 6
[  220.033910] cx231xx #0: Identified as Unknown CX231xx video grabber (card=0)
[  220.033946] BUG: unable to handle kernel NULL pointer dereference at (null)
[  220.033955] IP: [<ffffffffa0d3c8bd>] cx231xx_pre_card_setup+0x5d/0xb0 [cx231xx]

Thanks-to: Carlos Americo Domiciano <c_domiciano@yahoo.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/cx231xx/cx231xx-cards.c