aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/vmalloc.c
diff options
context:
space:
mode:
authorGary Bisson <[email protected]>2025-04-29 16:16:29 +0000
committerDmitry Torokhov <[email protected]>2025-04-29 16:27:49 +0000
commit11cdb506d0fbf5ac05bf55f5afcb3a215c316490 (patch)
tree3231534cc3004409068095b8818e11d0d13a02ce /rust/helpers/vmalloc.c
parentInput: xpad - add support for 8BitDo Ultimate 2 Wireless Controller (diff)
downloadkernel-11cdb506d0fbf5ac05bf55f5afcb3a215c316490.tar.gz
kernel-11cdb506d0fbf5ac05bf55f5afcb3a215c316490.zip
Input: mtk-pmic-keys - fix possible null pointer dereference
In mtk_pmic_keys_probe, the regs parameter is only set if the button is parsed in the device tree. However, on hardware where the button is left floating, that node will most likely be removed not to enable that input. In that case the code will try to dereference a null pointer. Let's use the regs struct instead as it is defined for all supported platforms. Note that it is ok setting the key reg even if that latter is disabled as the interrupt won't be enabled anyway. Fixes: b581acb49aec ("Input: mtk-pmic-keys - transfer per-key bit in mtk_pmic_keys_regs") Signed-off-by: Gary Bisson <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions