Commit 6fe1bfc4 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pza/linux into fixes

Pull "Reset controller fixes for v4.10" from Philipp Zabel:

- Remove erroneous negation of the error check of the reset function
  to decrement trigger_count in the error case, not on success. This
  fixes shared resets to actually only trigger once, as intended.

* tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pza/linux:
  reset: fix shared reset triggered_count decrement on error
parents 7089db84 e5a1dade
...@@ -163,7 +163,7 @@ int reset_control_reset(struct reset_control *rstc) ...@@ -163,7 +163,7 @@ int reset_control_reset(struct reset_control *rstc)
} }
ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id);
if (rstc->shared && !ret) if (rstc->shared && ret)
atomic_dec(&rstc->triggered_count); atomic_dec(&rstc->triggered_count);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment