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: 86e3ef812f
('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>
This commit is contained in:
parent
b5aa1006e4
commit
22bbd21b81
|
@ -1390,6 +1390,7 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
||||||
seq_printf(s,
|
seq_printf(s,
|
||||||
"Could not retrieve pin %i conf0 reg\n",
|
"Could not retrieve pin %i conf0 reg\n",
|
||||||
pin);
|
pin);
|
||||||
|
raw_spin_unlock_irqrestore(&vg->lock, flags);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
conf0 = readl(reg);
|
conf0 = readl(reg);
|
||||||
|
@ -1398,6 +1399,8 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
||||||
if (!reg) {
|
if (!reg) {
|
||||||
seq_printf(s,
|
seq_printf(s,
|
||||||
"Could not retrieve pin %i val reg\n", pin);
|
"Could not retrieve pin %i val reg\n", pin);
|
||||||
|
raw_spin_unlock_irqrestore(&vg->lock, flags);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
val = readl(reg);
|
val = readl(reg);
|
||||||
raw_spin_unlock_irqrestore(&vg->lock, flags);
|
raw_spin_unlock_irqrestore(&vg->lock, flags);
|
||||||
|
|
Loading…
Reference in New Issue