Commit dc6e08b1 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Takashi Iwai

ALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp()

When firmware status is invalid, assign -EINVAL to ret as ret is '0' at
that point and returning success is incorrect when firmware status is
invalid.

Fixes: a51d8ba0 ("ALSA: hda: cs35l41: Check CSPL state after loading firmware")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20231030070836.3234385-1-harshit.m.mogalapalli@oracle.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2dc15ff7
...@@ -1042,6 +1042,7 @@ static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) ...@@ -1042,6 +1042,7 @@ static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41)
default: default:
dev_err(cs35l41->dev, "Firmware status is invalid: %u\n", dev_err(cs35l41->dev, "Firmware status is invalid: %u\n",
fw_status); fw_status);
ret = -EINVAL;
goto clean_dsp; goto clean_dsp;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment