Skip to content

Commit eca836d

Browse files
committed
soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic()
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: 0b7c607 ("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>
1 parent 38405d3 commit eca836d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/samsung/exynos-pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static int tensor_set_bits_atomic(void *ctx, unsigned int offset, u32 val,
126126
if (ret)
127127
return ret;
128128
}
129-
return ret;
129+
return 0;
130130
}
131131

132132
static bool tensor_is_atomic(unsigned int reg)

0 commit comments

Comments
 (0)