[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
[firefly-linux-kernel-4.4.55.git] / sound / ppc / keywest.c
index fb05938dcbd91c5a6f75e4191c1f74835010f4b0..59482a4cd44641ecd8d9ab253c128c93ae1dd3a3 100644 (file)
@@ -64,11 +64,10 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
        if (strncmp(i2c_device_name(adapter), "mac-io", 6))
                return 0; /* ignored */
 
-       new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (! new_client)
                return -ENOMEM;
 
-       memset(new_client, 0, sizeof(*new_client));
        new_client->addr = keywest_ctx->addr;
        i2c_set_clientdata(new_client, keywest_ctx);
        new_client->adapter = adapter;