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 <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 69aeb50 commit d83f151

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)