Browse Source

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: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Richard Genoud 12 năm trước cách đây
mục cha
commit
175ca83c0b
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      drivers/pinctrl/core.c

+ 2 - 0
drivers/pinctrl/core.c

@@ -991,6 +991,8 @@ unapply_new_state:
 				pinmux_enable_setting(setting);
 				pinmux_enable_setting(setting);
 		}
 		}
 	}
 	}
+
+	p->state = old_state;
 	return ret;
 	return ret;
 }
 }