提交 b08e8d8a 编写于 作者: L Lucas Tanure 提交者: Jiri Kosina

HID: appleir: Remove unnecessary goto label

Signed-off-by: NLucas Tanure <tanure@linux.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 278de45e
......@@ -284,10 +284,8 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
struct appleir *appleir;
appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
if (!appleir) {
ret = -ENOMEM;
goto allocfail;
}
if (!appleir)
return -ENOMEM;
appleir->hid = hid;
......@@ -314,7 +312,6 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
return 0;
fail:
kfree(appleir);
allocfail:
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册