X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fvpx3220.c;h=d0a1e72ea8c46924482141d1ad2dc64b30570c78;hb=ab33d5071de7a33616842882c11b5eb52a6c26a1;hp=8dcee8b60e21a2cfc458808b1bbf13376d814a7b;hpb=ccf18968b1bbc2fb117190a1984ac2a826dac228;p=linux-2.6-omap-h63xx.git diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 8dcee8b60e2..d0a1e72ea8c 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;