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/bt856.c | |
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/bt856.c')
-rw-r--r-- | drivers/media/video/bt856.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index 60508069bbed..909b593530ed 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c | |||
@@ -316,21 +316,19 @@ bt856_detect_client (struct i2c_adapter *adapter, | |||
316 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 316 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
317 | return 0; | 317 | return 0; |
318 | 318 | ||
319 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 319 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
320 | if (client == 0) | 320 | if (client == 0) |
321 | return -ENOMEM; | 321 | return -ENOMEM; |
322 | memset(client, 0, sizeof(struct i2c_client)); | ||
323 | client->addr = address; | 322 | client->addr = address; |
324 | client->adapter = adapter; | 323 | client->adapter = adapter; |
325 | client->driver = &i2c_driver_bt856; | 324 | client->driver = &i2c_driver_bt856; |
326 | strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); | 325 | strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); |
327 | 326 | ||
328 | encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); | 327 | encoder = kzalloc(sizeof(struct bt856), GFP_KERNEL); |
329 | if (encoder == NULL) { | 328 | if (encoder == NULL) { |
330 | kfree(client); | 329 | kfree(client); |
331 | return -ENOMEM; | 330 | return -ENOMEM; |
332 | } | 331 | } |
333 | memset(encoder, 0, sizeof(struct bt856)); | ||
334 | encoder->norm = VIDEO_MODE_NTSC; | 332 | encoder->norm = VIDEO_MODE_NTSC; |
335 | encoder->enable = 1; | 333 | encoder->enable = 1; |
336 | i2c_set_clientdata(client, encoder); | 334 | i2c_set_clientdata(client, encoder); |