Skip to content

Commit

Permalink
Merge tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pz…
Browse files Browse the repository at this point in the history
…a/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
  • Loading branch information
arndb committed Feb 17, 2017
2 parents 7089db8 + e5a1dad commit 6fe1bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/reset/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int reset_control_reset(struct reset_control *rstc)
}

ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id);
if (rstc->shared && !ret)
if (rstc->shared && ret)
atomic_dec(&rstc->triggered_count);

return ret;
Expand Down

0 comments on commit 6fe1bfc

Please sign in to comment.