Input: goodix - fix memory leak in goodix_firmware_upload
authorJosé Expósito <jose.exposito89@gmail.com>
Fri, 10 Dec 2021 05:18:13 +0000 (21:18 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 10 Dec 2021 05:20:29 +0000 (21:20 -0800)
Addresses-Coverity-ID: 1493934 ("Resource leak")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://lore.kernel.org/r/20211208173321.26659-1-jose.exposito89@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/goodix_fwupload.c

index c1e7a24..191d4f3 100644 (file)
@@ -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)