]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwmon/via686a.c
Pull memoryless-node-allocation into release branch
[karo-tx-linux.git] / drivers / hwmon / via686a.c
index 54861f13fee242042c30531e489fd1c7809ad1c4..6f696f897176b678b05a11228a775d3abc603c05 100644 (file)
@@ -621,11 +621,10 @@ static int via686a_detect(struct i2c_adapter *adapter)
                return -ENODEV;
        }
 
-       if (!(data = kmalloc(sizeof(struct via686a_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct via686a_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit_release;
        }
-       memset(data, 0, sizeof(struct via686a_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);
@@ -712,7 +711,6 @@ static int via686a_detach_client(struct i2c_client *client)
        return 0;
 }
 
-/* Called when we have found a new VIA686A. Set limits, etc. */
 static void via686a_init_client(struct i2c_client *client)
 {
        u8 reg;