summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHenrik Rydberg2010-10-13 15:58:17 +0200
committerJiri Kosina2010-11-04 16:04:44 +0100
commit5a39ce5b491a10f4a15bd30b26e55d3533b5f587 (patch)
treef3cd63a1409ad23fcc94773f4aa3994f5dd44233 /drivers
parentHID: Remove KERN_DEBUG from dbg_hid use (diff)
downloadkernel-qcow2-linux-5a39ce5b491a10f4a15bd30b26e55d3533b5f587.tar.gz
kernel-qcow2-linux-5a39ce5b491a10f4a15bd30b26e55d3533b5f587.tar.xz
kernel-qcow2-linux-5a39ce5b491a10f4a15bd30b26e55d3533b5f587.zip
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')
-rw-r--r--drivers/hid/hid-egalax.c2
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)
struct egalax_data *td;
struct hid_report *report;
- td = kmalloc(sizeof(struct egalax_data), GFP_KERNEL);
+ td = kzalloc(sizeof(struct egalax_data), GFP_KERNEL);
if (!td) {
dev_err(&hdev->dev, "cannot allocate eGalax data\n");
return -ENOMEM;