]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi: kcs_bmc_aspeed: Fix less than zero comparison of a unsigned int
authorColin Ian King <colin.king@canonical.com>
Wed, 16 Jun 2021 16:29:13 +0000 (17:29 +0100)
committerCorey Minyard <cminyard@mvista.com>
Tue, 22 Jun 2021 00:50:36 +0000 (19:50 -0500)
commitc19b8e93a08d7dae5ac3267fdd0be4aaea20d9f8
tree68a0ac99eaf436be8f43844c91a75b033e186915
parentb589e9c5777b1c3e9c1b894ac1db33a1a4de54d8
ipmi: kcs_bmc_aspeed: Fix less than zero comparison of a unsigned int

The comparisons of the unsigned int hw_type to less than zero always
false because it is unsigned. Fix this by using an int for the
assignment and less than zero check.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 9d2df9a0ad80 ("ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Message-Id: <20210616162913.15259-1-colin.king@canonical.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/kcs_bmc_aspeed.c