diff options
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 12 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 92b2a6db4fdc..343dff0f8a04 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -415,6 +415,12 @@ static int em28xx_audio_init(struct em28xx *dev) | |||
415 | static int devnr; | 415 | static int devnr; |
416 | int ret, err; | 416 | int ret, err; |
417 | 417 | ||
418 | if (dev->has_audio_class) { | ||
419 | /* This device does not support the extension (in this case | ||
420 | the device is expecting the snd-usb-audio module */ | ||
421 | return 0; | ||
422 | } | ||
423 | |||
418 | printk(KERN_INFO "em28xx-audio.c: probing for em28x1 " | 424 | printk(KERN_INFO "em28xx-audio.c: probing for em28x1 " |
419 | "non standard usbaudio\n"); | 425 | "non standard usbaudio\n"); |
420 | printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " | 426 | printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " |
@@ -458,6 +464,12 @@ static int em28xx_audio_fini(struct em28xx *dev) | |||
458 | if (dev == NULL) | 464 | if (dev == NULL) |
459 | return 0; | 465 | return 0; |
460 | 466 | ||
467 | if (dev->has_audio_class) { | ||
468 | /* This device does not support the extension (in this case | ||
469 | the device is expecting the snd-usb-audio module */ | ||
470 | return 0; | ||
471 | } | ||
472 | |||
461 | if (dev->adev) { | 473 | if (dev->adev) { |
462 | snd_card_free(dev->adev->sndcard); | 474 | snd_card_free(dev->adev->sndcard); |
463 | kfree(dev->adev); | 475 | kfree(dev->adev); |
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; |