mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
ALSA: lx_core: use int type to store negative error codes
[ Upstream commit4ef353d546] 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:02bec49045("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d91b39e21c
commit
ae60a599fd
@@ -316,7 +316,7 @@ polling_successful:
|
|||||||
/* low-level dsp access */
|
/* low-level dsp access */
|
||||||
int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
|
int lx_dsp_get_version(struct lx6464es *chip, u32 *rdsp_version)
|
||||||
{
|
{
|
||||||
u16 ret;
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&chip->msg_lock);
|
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)
|
int lx_dsp_get_clock_frequency(struct lx6464es *chip, u32 *rfreq)
|
||||||
{
|
{
|
||||||
u16 ret = 0;
|
|
||||||
u32 freq_raw = 0;
|
u32 freq_raw = 0;
|
||||||
u32 freq = 0;
|
u32 freq = 0;
|
||||||
u32 frequency = 0;
|
u32 frequency = 0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&chip->msg_lock);
|
mutex_lock(&chip->msg_lock);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user