diff options
author | Gary Bisson <bisson.gary@gmail.com> | 2025-04-29 09:16:29 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-04-29 09:27:49 -0700 |
commit | 11cdb506d0fbf5ac05bf55f5afcb3a215c316490 (patch) | |
tree | 3231534cc3004409068095b8818e11d0d13a02ce /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 22cd66a5db56a07d9e621367cb4d16ff0f6baf56 (diff) |
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 <bisson.gary@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions