pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
authorZhen Lei <thunder.leizhen@huawei.com>
Thu, 22 Jul 2021 03:39:29 +0000 (11:39 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 10 Aug 2021 12:42:55 +0000 (14:42 +0200)
Fix to return -ENOTSUPP instead of 0 when PCS_HAS_PINCONF is true, which
is the same as that returned in pcs_parse_pinconf().

Fixes: 4e7e8017a80e ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210722033930.4034-2-thunder.leizhen@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c

index e3aa64798f7d3905f4c594ff125b415f0679c04d..4fcae8458359c9fcfee2deb7685be06dfdb01357 100644 (file)
@@ -1224,6 +1224,7 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
 
        if (PCS_HAS_PINCONF) {
                dev_err(pcs->dev, "pinconf not supported\n");
+               res = -ENOTSUPP;
                goto free_pingroups;
        }