]> err.no Git - linux-2.6/blobdiff - drivers/media/video/ovcamchip/ovcamchip_core.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6] / drivers / media / video / ovcamchip / ovcamchip_core.c
index 428f1bb75ec30620a98cd9074e2277cdada67976..8063e33f1c85ebc45e2b49780fe0908d581d36cd 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include "ovcamchip_priv.h"
@@ -266,17 +265,17 @@ static int ovcamchip_detect(struct i2c_client *c)
                PDEBUG(3, "Testing for 0V6xx0");
                c->addr = OV6xx0_SID;
                if (init_camchip(c) < 0) {
-                       return -ENODEV;
+                       return -ENODEV;
                } else {
                        if (ov6xx0_detect(c) < 0) {
                                PERROR("Failed to init OV6xx0");
-                               return -EIO;
+                               return -EIO;
                        }
                }
        } else {
                if (ov7xx0_detect(c) < 0) {
                        PERROR("Failed to init OV7xx0");
-                       return -EIO;
+                       return -EIO;
                }
        }
 
@@ -316,12 +315,11 @@ static int ovcamchip_attach(struct i2c_adapter *adap)
        c->adapter = adap;
        strcpy(c->name, "OV????");
 
-       ov = kmalloc(sizeof *ov, GFP_KERNEL);
+       ov = kzalloc(sizeof *ov, GFP_KERNEL);
        if (!ov) {
                rc = -ENOMEM;
                goto no_ov;
        }
-       memset(ov, 0, sizeof *ov);
        i2c_set_clientdata(c, ov);
 
        rc = ovcamchip_detect(c);