HID: appleir: Remove unnecessary goto label
authorLucas Tanure <tanure@linux.com>
Sat, 29 Feb 2020 17:43:33 +0000 (17:43 +0000)
committerJiri Kosina <jkosina@suse.cz>
Fri, 13 Mar 2020 16:31:37 +0000 (17:31 +0100)
Signed-off-by: Lucas Tanure <tanure@linux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-appleir.c

index bf8d4afe0d6a0b3784f46773b93beb7c87f096ef..aafc285b538f244ec0d2da7dad6c4a4a8a7cac2c 100644 (file)
@@ -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;
 }