]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwmon/adm1025.c
[PATCH] v4l: 797: more intellect on clearing in bits on irq lock
[karo-tx-linux.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. */