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

Change the 'ret' variable from u32 to int to store negative error codes
directly or returned by other functions.

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: Mario Limonciello <mario.limonciello@amd.com>
Message-ID: <20250828075406.386208-2-rongqianfeng@vivo.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-rembrandt.c
sound/soc/amd/raven/acp3x-i2s.c
sound/soc/amd/vangogh/acp5x-i2s.c