pinctrl: pinctrl_select_state: set the old_state back on error
[cascardo/linux.git] / drivers / pinctrl / core.c
index f04f7d3..96cee79 100644 (file)
@@ -991,6 +991,8 @@ unapply_new_state:
                                pinmux_enable_setting(setting);
                }
        }
+
+       p->state = old_state;
        return ret;
 }