]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: qcom: use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Thu, 28 Aug 2025 07:53:59 +0000 (15:53 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 28 Aug 2025 14:07:45 +0000 (16:07 +0200)
commit11f5c5f9e43e9020bae452232983fe98e7abfce0
tree8ee2fc51f5aeed99cf848ac685b62d8b33b92a2a
parent784771cdd77091e7e93b78b5de55006295cc7b8e
ASoC: qcom: use int type to store negative error codes

Change the 'ret' variable from unsigned int to int to store negative error
codes or zero returned by regmap_field_write().

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Message-ID: <20250828075406.386208-4-rongqianfeng@vivo.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-cdc-dma.c
sound/soc/qcom/lpass-hdmi.c