Skip to content

Commit 28f54f4

Browse files
qianfengrongUlrich Hecht
authored andcommitted
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: 02bec49 ("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> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 54dea9e commit 28f54f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/pci/lx6464es/lx_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static int lx_message_send_atomic(struct lx6464es *chip, struct lx_rmh *rmh)
331331
/* low-level dsp access */
332332
int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
333333
{
334-
u16 ret;
334+
int ret;
335335

336336
mutex_lock(&chip->msg_lock);
337337

@@ -345,10 +345,10 @@ int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
345345

346346
int lx_dsp_get_clock_frequency(struct lx6464es *chip, u32 *rfreq)
347347
{
348-
u16 ret = 0;
349348
u32 freq_raw = 0;
350349
u32 freq = 0;
351350
u32 frequency = 0;
351+
int ret;
352352

353353
mutex_lock(&chip->msg_lock);
354354

0 commit comments

Comments
 (0)