[PATCH] hwmon: Static function fixes, 2 of 4
[powerpc.git] / drivers / hwmon / adm1025.c
index 526b7ff..3ec1242 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. */