summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-08-28 16:13:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-15 11:56:31 +0200
commita0c5aa7b48bcd4cd74f78bba3c08584e4fa32b2b (patch)
tree110f876476149c96d07166c505e99730296dc883 /sound
parentd53f2caab283afd0c079a0eaf191586a384decb3 (diff)
downloadlinux-a0c5aa7b48bcd4cd74f78bba3c08584e4fa32b2b.tar.gz
linux-a0c5aa7b48bcd4cd74f78bba3c08584e4fa32b2b.tar.bz2
linux-a0c5aa7b48bcd4cd74f78bba3c08584e4fa32b2b.zip
ALSA: lx_core: use int type to store negative error codes
[ Upstream commit 4ef353d546cda466fc39b7daca558d7bcec21c09 ] Change the 'ret' variable from u16 to int to store negative error codes or zero returned by lx_message_send_atomic(). 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. Fixes: 02bec4904508 ("ALSA: lx6464es - driver for the digigram lx6464es interface") Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Link: https://patch.msgid.link/20250828081312.393148-1-rongqianfeng@vivo.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/lx6464es/lx_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index b5b0d43bb8dc..c3f2717aebf2 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -316,7 +316,7 @@ polling_successful:
/* low-level dsp access */
int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
{
- u16 ret;
+ int ret;
mutex_lock(&chip->msg_lock);
@@ -330,10 +330,10 @@ int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
int lx_dsp_get_clock_frequency(struct lx6464es *chip, u32 *rfreq)
{
- u16 ret = 0;
u32 freq_raw = 0;
u32 freq = 0;
u32 frequency = 0;
+ int ret;
mutex_lock(&chip->msg_lock);