summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-17 17:25:15 +0100
committerArnd Bergmann <arnd@arndb.de>2017-02-17 17:25:15 +0100
commit6fe1bfc46cad54a4ef337f9935f764a90865236b (patch)
tree262ed4eb9a46e931869c7df52bfefe5cb16d6b29 /drivers
parent7089db84e356562f8ba737c29e472cc42d530dbc (diff)
parente5a1dadec3648019a838b85357b67f241fbb02e8 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/reset/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 10368ed8fd13..b6f5f1e1826c 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -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;