linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] HID: appleir: Remove unnecessary goto label
@ 2020-02-29 17:43 Lucas Tanure
  2020-02-29 17:43 ` [PATCH 2/2] HID: appleir: Use devm_kzalloc() instead of kzalloc() Lucas Tanure
  2020-03-13 16:32 ` [PATCH 1/2] HID: appleir: Remove unnecessary goto label Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Tanure @ 2020-02-29 17:43 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kernel; +Cc: Lucas Tanure

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;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-13 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 17:43 [PATCH 1/2] HID: appleir: Remove unnecessary goto label Lucas Tanure
2020-02-29 17:43 ` [PATCH 2/2] HID: appleir: Use devm_kzalloc() instead of kzalloc() Lucas Tanure
2020-03-13 16:32 ` [PATCH 1/2] HID: appleir: Remove unnecessary goto label Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).