Skip to content

Commit d83f151

Browse files
Dan Carpenterdtor
authored andcommitted
Input: imx_sc_key - fix memory corruption on unload
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: 768062f ("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>
1 parent 69aeb50 commit d83f151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/imx_sc_key.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int imx_sc_key_probe(struct platform_device *pdev)
158158
return error;
159159
}
160160

161-
error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, &priv);
161+
error = devm_add_action_or_reset(&pdev->dev, imx_sc_key_action, priv);
162162
if (error)
163163
return error;
164164

0 commit comments

Comments
 (0)