summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-10-28 11:51:12 +0000
committerMark Brown <broonie@kernel.org>2020-10-28 21:33:22 +0000
commitbcc96dc3cf8048c80af7c487af17e19be27ac57d (patch)
tree23394a35f2129eeaa3d188c72acbb9ecf3c7a1de /sound/soc/qcom
parent7c91d02068c342918003606bf378b259f37b31ba (diff)
downloadlinux-bcc96dc3cf8048c80af7c487af17e19be27ac57d.tar.bz2
ASoC: qcom: fix unsigned int bitwidth compared to less than zero
The check for an error return from the call to snd_pcm_format_width is never true as the unsigned int bitwidth can never be less than zero. Fix this by making bitwidth an int. Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20201028115112.109017-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r--sound/soc/qcom/lpass-hdmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/qcom/lpass-hdmi.c b/sound/soc/qcom/lpass-hdmi.c
index 172952d3a5d6..abfb8737a89f 100644
--- a/sound/soc/qcom/lpass-hdmi.c
+++ b/sound/soc/qcom/lpass-hdmi.c
@@ -24,7 +24,7 @@ static int lpass_hdmi_daiops_hw_params(struct snd_pcm_substream *substream,
unsigned int rate = params_rate(params);
unsigned int channels = params_channels(params);
unsigned int ret;
- unsigned int bitwidth;
+ int bitwidth;
unsigned int word_length;
unsigned int ch_sts_buf0;
unsigned int ch_sts_buf1;