aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/gl518sm.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/gl518sm.c
parent406119f49d4a6cf8b6eee639128e0575a95065e3 (diff)
parenta9d1b24d91f91b77db3da8aeacb414764f789b9c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/hwmon/gl518sm.c')
-rw-r--r--drivers/hwmon/gl518sm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/gl518sm.c b/drivers/hwmon/gl518sm.c
index 256b9323c84..2f178dbe3d8 100644
--- a/drivers/hwmon/gl518sm.c
+++ b/drivers/hwmon/gl518sm.c
@@ -365,11 +365,10 @@ static int gl518_detect(struct i2c_adapter *adapter, int address, int kind)
client structure, even though we cannot fill it completely yet.
But it allows us to access gl518_{read,write}_value. */
- if (!(data = kmalloc(sizeof(struct gl518_data), GFP_KERNEL))) {
+ if (!(data = kzalloc(sizeof(struct gl518_data), GFP_KERNEL))) {
err = -ENOMEM;
goto exit;
}
- memset(data, 0, sizeof(struct gl518_data));
new_client = &data->client;
i2c_set_clientdata(new_client, data);