Message ID | 7c4c591bc1aa9e269cbf764a03e64d32dd6e6e96.1582998175.git.tanure@linux.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | b08e8d8a508a61d626e6fdd75869776dbe1b2e14 |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [1/2] HID: appleir: Remove unnecessary goto label | expand |
On Sat, 29 Feb 2020, Lucas Tanure wrote: > Signed-off-by: Lucas Tanure <tanure@linux.com> > --- > drivers/hid/hid-appleir.c | 7 ++----- > 1 file 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; > } Applied, thanks.
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; }
Signed-off-by: Lucas Tanure <tanure@linux.com> --- drivers/hid/hid-appleir.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)