pinctrl: mediatek: correct error handling
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 27 Dec 2020 20:18:26 +0000 (21:18 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 18 Jan 2021 20:23:06 +0000 (15:23 -0500)
commit97bf73762fed743291bb7e572aa659374990b93d
tree718194067045c1846a16935172b7f818e76a87cd
parentc65b7d1acfffda1a73bcea2cd0d2bc43ce54540f
pinctrl: mediatek: correct error handling

If no GPIO controller is found, the return value should not depend on a
random value on the stack. Initialize variable ret.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c