diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-06-20 08:40:22 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-07-17 10:50:17 +0200 |
commit | d0593c363f04ccc4bc7b6939c24a0ee65391c779 (patch) | |
tree | ddc89668045c164a012a5e0c68977f3a22adf5a2 /drivers | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) | |
download | linux-d0593c363f04ccc4bc7b6939c24a0ee65391c779.tar.gz |
pinctrl: sh-pfc: Propagate errors on group config
On group configuration, bail out if setting one of the individual pins
fails. We don't need to roll-back, the pinctrl core will do this for us.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index a70157f0acf4..225ecccf5706 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c @@ -742,13 +742,16 @@ static int sh_pfc_pinconf_group_set(struct pinctrl_dev *pctldev, unsigned group, struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); const unsigned int *pins; unsigned int num_pins; - unsigned int i; + unsigned int i, ret; pins = pmx->pfc->info->groups[group].pins; num_pins = pmx->pfc->info->groups[group].nr_pins; - for (i = 0; i < num_pins; ++i) - sh_pfc_pinconf_set(pctldev, pins[i], configs, num_configs); + for (i = 0; i < num_pins; ++i) { + ret = sh_pfc_pinconf_set(pctldev, pins[i], configs, num_configs); + if (ret) + return ret; + } return 0; } |