Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / media / video / em28xx / em28xx-dvb.c
index 8cf4983..0b2333e 100644 (file)
@@ -382,6 +382,11 @@ static int dvb_init(struct em28xx *dev)
        int result = 0;
        struct em28xx_dvb *dvb;
 
+       if (!dev->has_dvb) {
+               /* This device does not support the extension */
+               return 0;
+       }
+
        dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL);
 
        if (dvb == NULL) {
@@ -444,6 +449,11 @@ out_free:
 
 static int dvb_fini(struct em28xx *dev)
 {
+       if (!dev->has_dvb) {
+               /* This device does not support the extension */
+               return 0;
+       }
+
        if (dev->dvb) {
                unregister_dvb(dev->dvb);
                dev->dvb = NULL;