summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-11-01 16:25:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-01 11:43:23 +0100
commit56881294915a6e866d31a46f9bcb5e19167cfbaa (patch)
treed036d853f4bab38aa7690d7eaf8be8374c95acc7 /drivers/input/keyboard
parent47420474a1d9c4db19bbc654fc5b0a3723c26cb2 (diff)
downloadlinux-56881294915a6e866d31a46f9bcb5e19167cfbaa.tar.gz
linux-56881294915a6e866d31a46f9bcb5e19167cfbaa.tar.bz2
linux-56881294915a6e866d31a46f9bcb5e19167cfbaa.zip
Input: imx_sc_key - fix memory corruption on unload
commit d83f1512758f4ef6fc5e83219fe7eeeb6b428ea4 upstream. This is supposed to be "priv" but we accidentally pass "&priv" which is an address in the stack and so it will lead to memory corruption when the imx_sc_key_action() function is called. Remove the &. Fixes: 768062fd1284 ("Input: imx_sc_key - use devm_add_action_or_reset() to handle all cleanups") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/aQYKR75r2VMFJutT@stanley.mountain Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/imx_sc_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
index d18839f1f4f6..b620cd310cdb 100644
--- a/drivers/input/keyboard/imx_sc_key.c
+++ b/drivers/input/keyboard/imx_sc_key.c
@@ -158,7 +158,7 @@ static int imx_sc_key_probe(struct platform_device *pdev)
return error;
}
- error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, &priv);
+ error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, priv);
if (error)
return error;