pinctrl: mediatek: fix handling return value of mtk_pmx_find_gpio_mode

The function can return negative values, so its result should
be assigned to signed variable.

The problem has been detected using coccinelle semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci.

Fixes: 59ee9c9 ('pinctrl: mediatek: Add gpio_request_enable support')
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Andrzej Hajda 2016-02-11 15:34:08 +01:00 • committed by Linus Walleij
commit 740f5b08d4