diff options
author | Antti Palosaari <crope@iki.fi> | 2012-09-19 19:52:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 16:07:06 -0400 |
commit | 0c42a55c86228ba9d0969562fcebc2adc79bfddb (patch) | |
tree | 976464d64b62374a5bcc90cbdbd87044ecdbf8f2 /drivers/media/usb/em28xx | |
parent | a36a66d7aaa6468a91941ffcfb6d324f28825910 (diff) |
[media] em28xx: do not set PCTV 290e LNA handler if fe attach fail
It was a bug that could cause oops if demodulator attach was
failed.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-dvb.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 0ca3e05992bf..1662b70435b3 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c | |||
@@ -1002,20 +1002,22 @@ static int em28xx_dvb_init(struct em28xx *dev) | |||
1002 | result = -EINVAL; | 1002 | result = -EINVAL; |
1003 | goto out_free; | 1003 | goto out_free; |
1004 | } | 1004 | } |
1005 | } | ||
1006 | 1005 | ||
1007 | #ifdef CONFIG_GPIOLIB | 1006 | #ifdef CONFIG_GPIOLIB |
1008 | /* enable LNA for DVB-T, DVB-T2 and DVB-C */ | 1007 | /* enable LNA for DVB-T, DVB-T2 and DVB-C */ |
1009 | result = gpio_request_one(dvb->lna_gpio, GPIOF_OUT_INIT_LOW, | 1008 | result = gpio_request_one(dvb->lna_gpio, |
1010 | NULL); | 1009 | GPIOF_OUT_INIT_LOW, NULL); |
1011 | if (result) | 1010 | if (result) |
1012 | em28xx_errdev("gpio request failed %d\n", result); | 1011 | em28xx_errdev("gpio request failed %d\n", |
1013 | else | 1012 | result); |
1014 | gpio_free(dvb->lna_gpio); | 1013 | else |
1015 | 1014 | gpio_free(dvb->lna_gpio); | |
1016 | result = 0; /* continue even set LNA fails */ | 1015 | |
1016 | result = 0; /* continue even set LNA fails */ | ||
1017 | #endif | 1017 | #endif |
1018 | dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna; | 1018 | dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna; |
1019 | } | ||
1020 | |||
1019 | break; | 1021 | break; |
1020 | case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: | 1022 | case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: |
1021 | { | 1023 | { |