]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/vpx3220.c
V4L/DVB (3376): Add cpia2 camera support
[linux-2.6-omap-h63xx.git] / drivers / media / video / vpx3220.c
index 8dcee8b60e21a2cfc458808b1bbf13376d814a7b..d0a1e72ea8c46924482141d1ad2dc64b30570c78 100644 (file)
@@ -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;