]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/hwmon/adm1025.c
[PATCH] hwmon: kzalloc conversion
[mirror_ubuntu-zesty-kernel.git] / drivers / hwmon / adm1025.c
index 526b7ff179ebb83c0bc1197a978e85344424a6c8..3ec12421694f591df0de7c1e43ea924c331af1c1 100644 (file)
@@ -331,11 +331,10 @@ static int adm1025_detect(struct i2c_adapter *adapter, int address, int kind)
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                goto exit;
 
-       if (!(data = kmalloc(sizeof(struct adm1025_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct adm1025_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct adm1025_data));
 
        /* The common I2C client data is placed right before the
           ADM1025-specific data. */