Commit 175ca83c authored by Richard Genoud's avatar Richard Genoud Committed by Linus Walleij
Browse files

pinctrl: pinctrl_select_state: set the old_state back on error



In unapply_new_state, the old state is re-applied, but p->state is not
set back as it should.

Signed-off-by: default avatarRichard Genoud <richard.genoud@gmail.com>
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8009d5ff
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -991,6 +991,8 @@ unapply_new_state:
				pinmux_enable_setting(setting);
		}
	}

	p->state = old_state;
	return ret;
}