summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-04-27 11:08:35 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-04-30 13:34:53 +0200
commit22bbd21b81189942688db5aafe4a72074f38561b (patch)
treeb5f603da32f7335c3064e1f133ee45524132cda9 /drivers/pinctrl
parentb5aa1006e4a93ebb402490b4536a7d8866d967dc (diff)
pinctrl: baytrail: fix some error handling in debugfs
We need to unlock before continuing. Also the continue was accidentally left out on one error path which would lead to a NULL dereference. Fixes: 86e3ef812fe3 ('pinctrl: baytrail: Update gpio chip operations') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/intel/pinctrl-baytrail.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 6dcf43ab9efe..55182fc58c6a 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1390,6 +1390,7 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
seq_printf(s,
"Could not retrieve pin %i conf0 reg\n",
pin);
+ raw_spin_unlock_irqrestore(&vg->lock, flags);
continue;
}
conf0 = readl(reg);
@@ -1398,6 +1399,8 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
if (!reg) {
seq_printf(s,
"Could not retrieve pin %i val reg\n", pin);
+ raw_spin_unlock_irqrestore(&vg->lock, flags);
+ continue;
}
val = readl(reg);
raw_spin_unlock_irqrestore(&vg->lock, flags);