X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fovcamchip%2Fovcamchip_core.c;h=8063e33f1c85ebc45e2b49780fe0908d581d36cd;hb=c634920abaf9c0a93266a57beff6fce9d3852cb2;hp=428f1bb75ec30620a98cd9074e2277cdada67976;hpb=cc918c7ab7da017bfaf9661420bb5c462e057cfb;p=linux-2.6 diff --git a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c index 428f1bb75e..8063e33f1c 100644 --- a/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #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);