button: qcom-pmic: Fix dereference of uninitialised pointer
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 23 Jul 2025 10:58:04 +0000 (11:58 +0100)
committerCasey Connolly <casey.connolly@linaro.org>
Wed, 13 Aug 2025 13:17:46 +0000 (15:17 +0200)
commit8a0bb0b176069989d645e1edca2737d46770a530
tree957c064224a3a30a840c5d0faca80fcfef02515f
parent10e65926a37d06831fc913221f9eb930c4194060
button: qcom-pmic: Fix dereference of uninitialised pointer

The pointer 'label' is declared and later dereferenced without ever
having a value assigned to it. Add an assignment to this pointer so it
will be valid later when dereferenced.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250723-button-qcom-pmic-v1-1-9c317ac71167@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
drivers/button/button-qcom-pmic.c