]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:47:27 +0000 (23:47 -0500)
commit58c89bf68e98e0cdb5a99495bdbea366ffd81bda
tree5167f47b9bc84427b2244bc89a72d185be758a58
parent8fd9696de2bdbdf8c19d2de351ca90a1d313bb9b
ALSA: cs4236: fix error return comparison of an unsigned integer

BugLink: https://bugs.launchpad.net/bugs/1860602
commit d60229d84846a8399257006af9c5444599f64361 upstream.

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: a9824c868a2c ("[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/isa/cs423x/cs4236.c