Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

firmware: exynos-acpm: Use unsigned int for acpm_pmic_linux_errmap index

acpm_pmic_to_linux_err() uses an unsigned integer obtained from messages
as index of array to map them to error codes. Array index cannot be
negative, so make that explicit.

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260219-firmare-acpm-counted-v2-1-e1f7389237d3@oss.qualcomm.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Krzysztof Kozlowski
910e91a6 6de23f81

+1 -1
+1 -1
drivers/firmware/samsung/exynos-acpm-pmic.c
··· 41 41 [2] = -EACCES, /* Write register can't be accessed or issues to access it. */ 42 42 }; 43 43 44 - static int acpm_pmic_to_linux_err(int err) 44 + static int acpm_pmic_to_linux_err(unsigned int err) 45 45 { 46 46 if (err >= 0 && err < ARRAY_SIZE(acpm_pmic_linux_errmap)) 47 47 return acpm_pmic_linux_errmap[err];