]> Git Repo - linux.git/commit
Input: adp5589-keys - fix NULL pointer dereference
authorNuno Sa <[email protected]>
Tue, 1 Oct 2024 14:46:44 +0000 (07:46 -0700)
committerDmitry Torokhov <[email protected]>
Tue, 1 Oct 2024 14:48:48 +0000 (07:48 -0700)
commitfb5cc65f973661241e4a2b7390b429aa7b330c69
tree0b829981a3cdf48bdece0c409720434d53e3ef79
parenta3f9a74d210bf5b80046a840d3e9949b5fe0a67c
Input: adp5589-keys - fix NULL pointer dereference

We register a devm action to call adp5589_clear_config() and then pass
the i2c client as argument so that we can call i2c_get_clientdata() in
order to get our device object. However, i2c_set_clientdata() is only
being set at the end of the probe function which means that we'll get a
NULL pointer dereference in case the probe function fails early.

Fixes: 30df385e35a4 ("Input: adp5589-keys - use devm_add_action_or_reset() for register clear")
Signed-off-by: Nuno Sa <[email protected]>
Link: https://lore.kernel.org/r/20241001-b4-dev-adp5589-fw-conversion-v1-1-fca0149dfc47@analog.com
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/keyboard/adp5589-keys.c
This page took 0.051594 seconds and 4 git commands to generate.