Skip to content

Commit

Permalink
pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_e…
Browse files Browse the repository at this point in the history
…ntry()

[ Upstream commit d789a49 ]

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: 4e7e801 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhen Lei authored and gregkh committed Sep 18, 2021
1 parent 9a3fda1 commit 4bafe1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pinctrl/pinctrl-single.c
Expand Up @@ -1221,6 +1221,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;
}

Expand Down

0 comments on commit 4bafe1a

Please sign in to comment.