[PATCH] Input: goodix - Fix memory leak in goodix_firmware_upload

Subsystems: goodix touchscreen, input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE1709d LANDED

Landed in mainline as 3fd6e12a401e on 2021-12-10.

2 messages, 2 authors, 2021-12-10 · open the first message on its own page

[PATCH] Input: goodix - Fix memory leak in goodix_firmware_upload

From: José Expósito <hidden>
Date: 2021-12-08 17:33:36

Addresses-Coverity-ID: 1493934 ("Resource leak")
Signed-off-by: José Expósito <redacted>
---
 drivers/input/touchscreen/goodix_fwupload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/goodix_fwupload.c b/drivers/input/touchscreen/goodix_fwupload.c
index c1e7a2413078..191d4f38d991 100644
--- a/drivers/input/touchscreen/goodix_fwupload.c
+++ b/drivers/input/touchscreen/goodix_fwupload.c
@@ -207,7 +207,7 @@ static int goodix_firmware_upload(struct goodix_ts_data *ts)
 
 	error = goodix_reset_no_int_sync(ts);
 	if (error)
-		return error;
+		goto release;
 
 	error = goodix_enter_upload_mode(ts->client);
 	if (error)
-- 
2.25.1

Re: [PATCH] Input: goodix - Fix memory leak in goodix_firmware_upload

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-12-10 05:19:54

On Wed, Dec 08, 2021 at 06:33:21PM +0100, José Expósito wrote:
Addresses-Coverity-ID: 1493934 ("Resource leak")
Signed-off-by: José Expósito <redacted>
Applied, thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help