diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-01-11 16:40:56 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 16:40:56 -0500 |
commit | 7408187d223f63d46a13b6a35b8f96b032c2f623 (patch) | |
tree | 425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/video/ovcamchip | |
parent | 0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff) |
V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ovcamchip')
-rw-r--r-- | drivers/media/video/ovcamchip/ov6x20.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov6x30.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov76be.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov7x10.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov7x20.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ovcamchip_core.c | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/video/ovcamchip/ov6x20.c b/drivers/media/video/ovcamchip/ov6x20.c index b3f4d266ced..c04130dab12 100644 --- a/drivers/media/video/ovcamchip/ov6x20.c +++ b/drivers/media/video/ovcamchip/ov6x20.c | |||
@@ -178,10 +178,9 @@ static int ov6x20_init(struct i2c_client *c) | |||
178 | if (rc < 0) | 178 | if (rc < 0) |
179 | return rc; | 179 | return rc; |
180 | 180 | ||
181 | ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); | 181 | ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); |
182 | if (!s) | 182 | if (!s) |
183 | return -ENOMEM; | 183 | return -ENOMEM; |
184 | memset(s, 0, sizeof *s); | ||
185 | 184 | ||
186 | s->auto_brt = 1; | 185 | s->auto_brt = 1; |
187 | s->auto_exp = 1; | 186 | s->auto_exp = 1; |
diff --git a/drivers/media/video/ovcamchip/ov6x30.c b/drivers/media/video/ovcamchip/ov6x30.c index 6eab458ab79..73b94f51a85 100644 --- a/drivers/media/video/ovcamchip/ov6x30.c +++ b/drivers/media/video/ovcamchip/ov6x30.c | |||
@@ -141,10 +141,9 @@ static int ov6x30_init(struct i2c_client *c) | |||
141 | if (rc < 0) | 141 | if (rc < 0) |
142 | return rc; | 142 | return rc; |
143 | 143 | ||
144 | ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); | 144 | ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); |
145 | if (!s) | 145 | if (!s) |
146 | return -ENOMEM; | 146 | return -ENOMEM; |
147 | memset(s, 0, sizeof *s); | ||
148 | 147 | ||
149 | s->auto_brt = 1; | 148 | s->auto_brt = 1; |
150 | s->auto_exp = 1; | 149 | s->auto_exp = 1; |
diff --git a/drivers/media/video/ovcamchip/ov76be.c b/drivers/media/video/ovcamchip/ov76be.c index 29bbdc05e3b..11f6be924d8 100644 --- a/drivers/media/video/ovcamchip/ov76be.c +++ b/drivers/media/video/ovcamchip/ov76be.c | |||
@@ -105,10 +105,9 @@ static int ov76be_init(struct i2c_client *c) | |||
105 | if (rc < 0) | 105 | if (rc < 0) |
106 | return rc; | 106 | return rc; |
107 | 107 | ||
108 | ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); | 108 | ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); |
109 | if (!s) | 109 | if (!s) |
110 | return -ENOMEM; | 110 | return -ENOMEM; |
111 | memset(s, 0, sizeof *s); | ||
112 | 111 | ||
113 | s->auto_brt = 1; | 112 | s->auto_brt = 1; |
114 | s->auto_exp = 1; | 113 | s->auto_exp = 1; |
diff --git a/drivers/media/video/ovcamchip/ov7x10.c b/drivers/media/video/ovcamchip/ov7x10.c index 6c383d4b14f..5206e791392 100644 --- a/drivers/media/video/ovcamchip/ov7x10.c +++ b/drivers/media/video/ovcamchip/ov7x10.c | |||
@@ -115,10 +115,9 @@ static int ov7x10_init(struct i2c_client *c) | |||
115 | if (rc < 0) | 115 | if (rc < 0) |
116 | return rc; | 116 | return rc; |
117 | 117 | ||
118 | ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); | 118 | ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); |
119 | if (!s) | 119 | if (!s) |
120 | return -ENOMEM; | 120 | return -ENOMEM; |
121 | memset(s, 0, sizeof *s); | ||
122 | 121 | ||
123 | s->auto_brt = 1; | 122 | s->auto_brt = 1; |
124 | s->auto_exp = 1; | 123 | s->auto_exp = 1; |
diff --git a/drivers/media/video/ovcamchip/ov7x20.c b/drivers/media/video/ovcamchip/ov7x20.c index 3c8c48f338b..8e26ae338f3 100644 --- a/drivers/media/video/ovcamchip/ov7x20.c +++ b/drivers/media/video/ovcamchip/ov7x20.c | |||
@@ -232,10 +232,9 @@ static int ov7x20_init(struct i2c_client *c) | |||
232 | if (rc < 0) | 232 | if (rc < 0) |
233 | return rc; | 233 | return rc; |
234 | 234 | ||
235 | ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); | 235 | ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); |
236 | if (!s) | 236 | if (!s) |
237 | return -ENOMEM; | 237 | return -ENOMEM; |
238 | memset(s, 0, sizeof *s); | ||
239 | 238 | ||
240 | s->auto_brt = 1; | 239 | s->auto_brt = 1; |
241 | s->auto_exp = DFL_AUTO_EXP; | 240 | s->auto_exp = DFL_AUTO_EXP; |
diff --git a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c index 428f1bb75ec..e76b53d5909 100644 --- a/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c | |||
@@ -316,12 +316,11 @@ static int ovcamchip_attach(struct i2c_adapter *adap) | |||
316 | c->adapter = adap; | 316 | c->adapter = adap; |
317 | strcpy(c->name, "OV????"); | 317 | strcpy(c->name, "OV????"); |
318 | 318 | ||
319 | ov = kmalloc(sizeof *ov, GFP_KERNEL); | 319 | ov = kzalloc(sizeof *ov, GFP_KERNEL); |
320 | if (!ov) { | 320 | if (!ov) { |
321 | rc = -ENOMEM; | 321 | rc = -ENOMEM; |
322 | goto no_ov; | 322 | goto no_ov; |
323 | } | 323 | } |
324 | memset(ov, 0, sizeof *ov); | ||
325 | i2c_set_clientdata(c, ov); | 324 | i2c_set_clientdata(c, ov); |
326 | 325 | ||
327 | rc = ovcamchip_detect(c); | 326 | rc = ovcamchip_detect(c); |