[PATCH] hwmon: kzalloc conversion
[linux-2.6-block.git] / drivers / hwmon / gl520sm.c
index 12fd757066fc9cad503b32a5c1df1e056909fbb5..c39ba12394260faebe9c1088e86e5e42a1b7b3ca 100644 (file)
@@ -536,11 +536,10 @@ static int gl520_detect(struct i2c_adapter *adapter, int address, int kind)
           client structure, even though we cannot fill it completely yet.
           But it allows us to access gl520_{read,write}_value. */
 
-       if (!(data = kmalloc(sizeof(struct gl520_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct gl520_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct gl520_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);