mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 17:43:59 +00:00
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)
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> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
3cdadc50bb
commit
c10469c637
@ -229,14 +229,16 @@ void cx231xx_pre_card_setup(struct cx231xx *dev)
|
||||
dev->board.name, dev->model);
|
||||
|
||||
/* set the direction for GPIO pins */
|
||||
cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1);
|
||||
cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1);
|
||||
cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1);
|
||||
if (dev->board.tuner_gpio) {
|
||||
cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1);
|
||||
cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1);
|
||||
cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1);
|
||||
|
||||
/* request some modules if any required */
|
||||
/* request some modules if any required */
|
||||
|
||||
/* reset the Tuner */
|
||||
cx231xx_gpio_set(dev, dev->board.tuner_gpio);
|
||||
/* reset the Tuner */
|
||||
cx231xx_gpio_set(dev, dev->board.tuner_gpio);
|
||||
}
|
||||
|
||||
/* set the mode to Analog mode initially */
|
||||
cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user