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)
commit5b32dd281ee0a269f39ecf6b48f0cd3f37264842
tree68a0ac99eaf436be8f43844c91a75b033e186915
parentd0ec795c8c275ceca2076861f7fe3cc5f18da348
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