ASoC: qcom: fix unsigned int bitwidth compared to less than zero
authorColin Ian King <colin.king@canonical.com>
Wed, 28 Oct 2020 11:51:12 +0000 (11:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:52:59 +0000 (11:52 +0100)
commite3c471e7f1a421635ba5a0ed1ccd1539ae85eb0f
tree9896e3510c360b24b5a981dc6b73f086863cac8a
parentb8ab21e0171753577d42110841bdbfbd85a9d97c
ASoC: qcom: fix unsigned int bitwidth compared to less than zero

[ Upstream commit bcc96dc3cf8048c80af7c487af17e19be27ac57d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/qcom/lpass-hdmi.c