V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
[safe/jmp/linux-2.6] / drivers / media / video / wm8775.c
index c2e6d2e..8cb64f8 100644 (file)
@@ -166,11 +166,10 @@ static int wm8775_attach(struct i2c_adapter *adapter, int address, int kind)
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                return 0;
 
-       client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (client == 0)
                return -ENOMEM;
 
-       memset(client, 0, sizeof(struct i2c_client));
        client->addr = address;
        client->adapter = adapter;
        client->driver = &i2c_driver;