[PATCH 4.17 005/101] pinctrl: mt7622: fix error path on failing at groups building

From: Greg Kroah-Hartman
Date: Fri Jul 20 2018 - 08:39:29 EST


4.17-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Wang <sean.wang@xxxxxxxxxxxx>

commit fafa35cce34ba4c4f6fd7f1026c038de0a2884af upstream.

It should be to return an error code when failing at groups building.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: d6ed93551320 ("pinctrl: mediatek: add pinctrl driver for MT7622 SoC")
Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1561,7 +1561,7 @@ static int mtk_pinctrl_probe(struct plat
err = mtk_build_groups(hw);
if (err) {
dev_err(&pdev->dev, "Failed to build groups\n");
- return 0;
+ return err;
}

/* Setup functions descriptions per SoC types */