diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 8cf4983f0039..0b2333ee07f8 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -382,6 +382,11 @@ static int dvb_init(struct em28xx *dev) | |||
382 | int result = 0; | 382 | int result = 0; |
383 | struct em28xx_dvb *dvb; | 383 | struct em28xx_dvb *dvb; |
384 | 384 | ||
385 | if (!dev->has_dvb) { | ||
386 | /* This device does not support the extension */ | ||
387 | return 0; | ||
388 | } | ||
389 | |||
385 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); | 390 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); |
386 | 391 | ||
387 | if (dvb == NULL) { | 392 | if (dvb == NULL) { |
@@ -444,6 +449,11 @@ out_free: | |||
444 | 449 | ||
445 | static int dvb_fini(struct em28xx *dev) | 450 | static int dvb_fini(struct em28xx *dev) |
446 | { | 451 | { |
452 | if (!dev->has_dvb) { | ||
453 | /* This device does not support the extension */ | ||
454 | return 0; | ||
455 | } | ||
456 | |||
447 | if (dev->dvb) { | 457 | if (dev->dvb) { |
448 | unregister_dvb(dev->dvb); | 458 | unregister_dvb(dev->dvb); |
449 | dev->dvb = NULL; | 459 | dev->dvb = NULL; |