]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: cs4236: fix error return comparison of an unsigned integer
authorColin Ian King <colin.king@canonical.com>
Fri, 22 Nov 2019 13:13:54 +0000 (13:13 +0000)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Nov 2019 13:21:27 +0000 (14:21 +0100)
commite5e8432a29fd2bdb2c26049140e8f3ff0831866c
treeb62831a16ab6d16bbea898a4e7f4b2a6dda37381
parentbc49a29e51d350ca36a89724693ba11b8a139293
ALSA: cs4236: fix error return comparison of an unsigned integer

The return from pnp_irq is an unsigned integer type resource_size_t
and hence the error check for a positive non-error code is always
going to be true.  A check for a non-failure return from pnp_irq
should in fact be for (resource_size_t)-1 rather than >= 0.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 8b6f6eee30e4 ("[ALSA] Add CS4232 PnP BIOS support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20191122131354.58042-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/cs423x/cs4236.c