diff mbox series

[1/1] Input: atmel_mxt_ts - fix leak in mxt_update_cfg()

Message ID 20190702114312.97197-1-ian.ray@ge.com (mailing list archive)
State Mainlined
Commit f0dd687815f9546860fc3ac4379d55da045942c9
Headers show
Series [1/1] Input: atmel_mxt_ts - fix leak in mxt_update_cfg() | expand

Commit Message

Ian Ray July 2, 2019, 11:43 a.m. UTC
Fix leak (whose magnitude is the configuration file size) when the CRCs
match in mxt_update_cfg().

Signed-off-by: Ian Ray <ian.ray@ge.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 19378f2..89908fd 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1521,7 +1521,8 @@  static int mxt_update_cfg(struct mxt_data *data, const struct firmware *fw)
 		} else if (config_crc == data->config_crc) {
 			dev_dbg(dev, "Config CRC 0x%06X: OK\n",
 				 data->config_crc);
-			return 0;
+			ret = 0;
+			goto release_raw;
 		} else {
 			dev_info(dev, "Config CRC 0x%06X: does not match file 0x%06X\n",
 				 data->config_crc, config_crc);