diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 7df81575b7f2..0b2333ee07f8 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -251,7 +251,6 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) | |||
251 | printk(KERN_ERR "%s/2: xc3028 attach failed\n", | 251 | printk(KERN_ERR "%s/2: xc3028 attach failed\n", |
252 | dev->name); | 252 | dev->name); |
253 | dvb_frontend_detach(dev->dvb->frontend); | 253 | dvb_frontend_detach(dev->dvb->frontend); |
254 | dvb_unregister_frontend(dev->dvb->frontend); | ||
255 | dev->dvb->frontend = NULL; | 254 | dev->dvb->frontend = NULL; |
256 | return -EINVAL; | 255 | return -EINVAL; |
257 | } | 256 | } |
@@ -383,6 +382,11 @@ static int dvb_init(struct em28xx *dev) | |||
383 | int result = 0; | 382 | int result = 0; |
384 | struct em28xx_dvb *dvb; | 383 | struct em28xx_dvb *dvb; |
385 | 384 | ||
385 | if (!dev->has_dvb) { | ||
386 | /* This device does not support the extension */ | ||
387 | return 0; | ||
388 | } | ||
389 | |||
386 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); | 390 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); |
387 | 391 | ||
388 | if (dvb == NULL) { | 392 | if (dvb == NULL) { |
@@ -445,6 +449,11 @@ out_free: | |||
445 | 449 | ||
446 | static int dvb_fini(struct em28xx *dev) | 450 | static int dvb_fini(struct em28xx *dev) |
447 | { | 451 | { |
452 | if (!dev->has_dvb) { | ||
453 | /* This device does not support the extension */ | ||
454 | return 0; | ||
455 | } | ||
456 | |||
448 | if (dev->dvb) { | 457 | if (dev->dvb) { |
449 | unregister_dvb(dev->dvb); | 458 | unregister_dvb(dev->dvb); |
450 | dev->dvb = NULL; | 459 | dev->dvb = NULL; |