X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Fadm1031.c;h=7c545d5eee4570f0cbe9c4e175db925db36344bd;hb=f24e09754bcb4d367664ea635c0c4ccde6ec4df5;hp=58338ed7c8a1c676095e3c9672fa08e453455a7b;hpb=0481990b758628e12f4b0a9e15094e70cefc7cd1;p=linux-2.6-omap-h63xx.git diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index 58338ed7c8a..7c545d5eee4 100644 --- a/drivers/hwmon/adm1031.c +++ b/drivers/hwmon/adm1031.c @@ -740,11 +740,10 @@ static int adm1031_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 adm1031_data), GFP_KERNEL))) { + if (!(data = kzalloc(sizeof(struct adm1031_data), GFP_KERNEL))) { err = -ENOMEM; goto exit; } - memset(data, 0, sizeof(struct adm1031_data)); new_client = &data->client; i2c_set_clientdata(new_client, data);