X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fhwmon%2Flm63.c;h=954ec249724974107a14964ec00c2e3e25eb261f;hb=849a8924a6740ecbf9711e015beca69425f0c429;hp=be5c7095ecbb2648bf86a05583373b0e9a30a157;hpb=ddbf9ef385bfbef897210733abfb73cb9b94ecec;p=powerpc.git diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index be5c7095ec..954ec24972 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c @@ -375,11 +375,10 @@ static int lm63_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 lm63_data), GFP_KERNEL))) { + if (!(data = kzalloc(sizeof(struct lm63_data), GFP_KERNEL))) { err = -ENOMEM; goto exit; } - memset(data, 0, sizeof(struct lm63_data)); /* The common I2C client data is placed right before the LM63-specific data. */