summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorIan Ray <ian.ray@ge.com>2019-07-04 16:13:25 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-07-05 10:17:07 -0700
commitf0dd687815f9546860fc3ac4379d55da045942c9 (patch)
tree24b36f2d7ac16bbf267e7fac9ecb8c870826de27 /drivers/input/touchscreen
parentabbe3acd7d72ab4633ade6bd24e8306b67e0add3 (diff)
downloadlinux-f0dd687815f9546860fc3ac4379d55da045942c9.tar.gz
linux-f0dd687815f9546860fc3ac4379d55da045942c9.tar.bz2
linux-f0dd687815f9546860fc3ac4379d55da045942c9.zip
Input: atmel_mxt_ts - fix leak in mxt_update_cfg()
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> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 5c63d25ce84e..8b536778f1d8 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1526,7 +1526,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);