diff options
Diffstat (limited to 'drivers/media/video/vpx3220.c')
-rw-r--r-- | drivers/media/video/vpx3220.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 8dcee8b60e21..d0a1e72ea8c4 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c @@ -621,13 +621,11 @@ vpx3220_detect_client (struct i2c_adapter *adapter, (adapter, I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == NULL) { return -ENOMEM; } - memset(client, 0, sizeof(struct i2c_client)); - client->addr = address; client->adapter = adapter; client->driver = &vpx3220_i2c_driver; @@ -675,12 +673,11 @@ vpx3220_detect_client (struct i2c_adapter *adapter, sizeof(I2C_NAME(client))); } - decoder = kmalloc(sizeof(struct vpx3220), GFP_KERNEL); + decoder = kzalloc(sizeof(struct vpx3220), GFP_KERNEL); if (decoder == NULL) { kfree(client); return -ENOMEM; } - memset(decoder, 0, sizeof(struct vpx3220)); decoder->norm = VIDEO_MODE_PAL; decoder->input = 0; decoder->enable = 1; |