aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 14:14:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 14:14:57 -0700
commit20731945ae743034353a88c307920d1f16cf8ac8 (patch)
tree132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /drivers/hwmon/lm75.c
parent406119f49d4a6cf8b6eee639128e0575a95065e3 (diff)
parenta9d1b24d91f91b77db3da8aeacb414764f789b9c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 9a3ebdf583f..d70f4c8fc1e 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -127,11 +127,10 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
/* OK. For now, we presume we have a valid client. We now create the
client structure, even though we cannot fill it completely yet.
But it allows us to access lm75_{read,write}_value. */
- if (!(data = kmalloc(sizeof(struct lm75_data), GFP_KERNEL))) {
+ if (!(data = kzalloc(sizeof(struct lm75_data), GFP_KERNEL))) {
err = -ENOMEM;
goto exit;
}
- memset(data, 0, sizeof(struct lm75_data));
new_client = &data->client;
i2c_set_clientdata(new_client, data);