Skip to content

Commit b08e8d8

Browse files
lucastanureJiri Kosina
authored andcommitted
HID: appleir: Remove unnecessary goto label
Signed-off-by: Lucas Tanure <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 278de45 commit b08e8d8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/hid/hid-appleir.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,8 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
284284
struct appleir *appleir;
285285

286286
appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
287-
if (!appleir) {
288-
ret = -ENOMEM;
289-
goto allocfail;
290-
}
287+
if (!appleir)
288+
return -ENOMEM;
291289

292290
appleir->hid = hid;
293291

@@ -314,7 +312,6 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
314312
return 0;
315313
fail:
316314
kfree(appleir);
317-
allocfail:
318315
return ret;
319316
}
320317

0 commit comments

Comments
 (0)