summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorLucas Tanure <tanure@linux.com>2020-02-29 17:43:33 +0000
committerJiri Kosina <jkosina@suse.cz>2020-03-13 17:31:37 +0100
commitb08e8d8a508a61d626e6fdd75869776dbe1b2e14 (patch)
treec19402d0a75c119e9c546492f7469ce3e7c11dfd /drivers/hid
parent278de45e145bedff90072fb47bafdde8393f6a80 (diff)
HID: appleir: Remove unnecessary goto label
Signed-off-by: Lucas Tanure <tanure@linux.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-appleir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c
index bf8d4afe0d6a..aafc285b538f 100644
--- a/drivers/hid/hid-appleir.c
+++ b/drivers/hid/hid-appleir.c
@@ -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;
}