diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-04 12:18:37 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-04 12:18:37 -0800 |
commit | 50f36c5aa12c8d0f2adca662e0c106212ea897a8 (patch) | |
tree | b1d631285b925629b8158396b22789bb480ece71 /drivers | |
parent | c2bf05db6c78f53ca5cd4b48f3b9b71f78d215f1 (diff) | |
parent | 8c9a59939deb4bfafdc451100c03d1e848b4169b (diff) |
Merge tag 'input-for-v6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fix from Dmitry Torokhov:
- a fix for Raydium touchscreen driver to stop leaking memory when
sending commands to the chip
* tag 'input-for-v6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/raydium_i2c_ts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index 3a4952935366..3d9c5758d8a4 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -211,12 +211,14 @@ static int raydium_i2c_send(struct i2c_client *client, error = raydium_i2c_xfer(client, addr, xfer, ARRAY_SIZE(xfer)); if (likely(!error)) - return 0; + goto out; msleep(RM_RETRY_DELAY_MS); } while (++tries < RM_MAX_RETRIES); dev_err(&client->dev, "%s failed: %d\n", __func__, error); +out: + kfree(tx_buf); return error; } |