Skip to content

Commit 50f36c5

Browse files
committed
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()
2 parents c2bf05d + 8c9a599 commit 50f36c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/input/touchscreen/raydium_i2c_ts.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ static int raydium_i2c_send(struct i2c_client *client,
211211

212212
error = raydium_i2c_xfer(client, addr, xfer, ARRAY_SIZE(xfer));
213213
if (likely(!error))
214-
return 0;
214+
goto out;
215215

216216
msleep(RM_RETRY_DELAY_MS);
217217
} while (++tries < RM_MAX_RETRIES);
218218

219219
dev_err(&client->dev, "%s failed: %d\n", __func__, error);
220+
out:
221+
kfree(tx_buf);
220222
return error;
221223
}
222224

0 commit comments

Comments
 (0)