Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22bbd21b authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

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: 86e3ef81 ('pinctrl: baytrail: Update gpio chip operations')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b5aa1006
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);