Commit 5a39ce5b authored by Henrik Rydberg's avatar Henrik Rydberg Committed by Jiri Kosina

HID: egalax: Use kzalloc

To avoid unnecessary explicit initialization, allocate zeroed memory.
Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
Acked-by: default avatarChase Douglas <chase.douglas@canonical.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 587d1452
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment