From: Qianfeng Rong Date: Thu, 28 Aug 2025 07:53:58 +0000 (+0800) Subject: ASoC: adau1977: use int type to store negative error codes X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=784771cdd77091e7e93b78b5de55006295cc7b8e;p=users%2Fhch%2Fmisc.git ASoC: adau1977: 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_update_bits(). 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 Reviewed-by: Nuno Sá Message-ID: <20250828075406.386208-3-rongqianfeng@vivo.com> Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c index ae59efb38f26..c193a9f22f59 100644 --- a/sound/soc/codecs/adau1977.c +++ b/sound/soc/codecs/adau1977.c @@ -795,7 +795,7 @@ static int adau1977_set_sysclk(struct snd_soc_component *component, struct adau1977 *adau1977 = snd_soc_component_get_drvdata(component); unsigned int mask = 0; unsigned int clk_src; - unsigned int ret; + int ret; if (dir != SND_SOC_CLOCK_IN) return -EINVAL;