Thread (2 messages) 2 messages, 2 authors, 2018-09-26

[PATCH] pinctrl: mediatek: fix check on EINT_NA comparison

From: Linus Walleij <hidden>
Date: 2018-09-26 07:42:16
Also in: kernel-janitors, linux-gpio, linux-mediatek, lkml

On Tue, Sep 25, 2018 at 11:55 AM Colin King [off-list ref] wrote:
From: Colin Ian King <redacted>

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 <redacted>
Patch applied.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help