pinctrl: mediatek: fix check on EINT_NA comparison
authorColin Ian King <colin.king@canonical.com>
Tue, 25 Sep 2018 09:55:56 +0000 (10:55 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 26 Sep 2018 07:43:01 +0000 (09:43 +0200)
commit7a52127e3cf170ae71dadefef4ec82fb600cde2d
tree8b546d35b60e7826b011f2b3cadca8c0f827465e
parent22eb8301dbc1d0c916c9b826094e4d7562e1491e
pinctrl: mediatek: fix check on EINT_NA comparison

Currently, the check on desc->eint.eint_n == EINT_NA is always false
because this is comparing a u16 to -1 which can never be true.  Fix
this by casting EINT_NA to u16.

Detected by CoverityScan, CID#1473610 ("Operands don't affect result")

Fixes: fb5fa8dc151b ("pinctrl: mediatek: extend struct mtk_pin_desc to pinctrl-mtk-common-v2.c")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-moore.c