]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic()
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 4 Jan 2025 13:56:05 +0000 (14:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:32 +0000 (10:05 +0100)
commit8fd332aebde33b9d043ea96e684b9e6a47a56833
tree2b86fbc392c743ef7e674cbe1986ff98071d1e5b
parent46607b0ab14086e2a3e3621777865fa5d619a6ac
soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic()

commit eca836dfd8386b32f1aae60f8e323218ac6a0b75 upstream.

If tensor_set_bits_atomic() is called with a mask of 0 the function will
just iterate over its bit, not perform any updates and return stack
value of 'ret'.

Also reported by smatch:

  drivers/soc/samsung/exynos-pmu.c:129 tensor_set_bits_atomic() error: uninitialized symbol 'ret'.

Fixes: 0b7c6075022c ("soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250104135605.109209-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/samsung/exynos-pmu.c