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>
This commit is contained in:
Henrik Rydberg 2010-10-13 15:58:17 +02:00 committed by Jiri Kosina
parent 587d145200
commit 5a39ce5b49
1 changed files with 1 additions and 1 deletions

View File

@ -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;