diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-10-13 09:58:17 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-11-04 11:04:44 -0400 |
commit | 5a39ce5b491a10f4a15bd30b26e55d3533b5f587 (patch) | |
tree | f3cd63a1409ad23fcc94773f4aa3994f5dd44233 /drivers/hid | |
parent | 587d145200f26758940099fbbc301fdd43d3f391 (diff) |
HID: egalax: Use kzalloc
To avoid unnecessary explicit initialization, allocate zeroed memory.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-egalax.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-egalax.c b/drivers/hid/hid-egalax.c index 54b017ad258d..5a1b52e0eb85 100644 --- a/drivers/hid/hid-egalax.c +++ b/drivers/hid/hid-egalax.c | |||
@@ -221,7 +221,7 @@ static int egalax_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
221 | struct egalax_data *td; | 221 | struct egalax_data *td; |
222 | struct hid_report *report; | 222 | struct hid_report *report; |
223 | 223 | ||
224 | td = kmalloc(sizeof(struct egalax_data), GFP_KERNEL); | 224 | td = kzalloc(sizeof(struct egalax_data), GFP_KERNEL); |
225 | if (!td) { | 225 | if (!td) { |
226 | dev_err(&hdev->dev, "cannot allocate eGalax data\n"); | 226 | dev_err(&hdev->dev, "cannot allocate eGalax data\n"); |
227 | return -ENOMEM; | 227 | return -ENOMEM; |