diff options
-rw-r--r-- | core/direct-controls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/direct-controls.c b/core/direct-controls.c index c6834d7..512cb36 100644 --- a/core/direct-controls.c +++ b/core/direct-controls.c @@ -247,10 +247,13 @@ static int dctl_clear_special_wakeup(struct cpu_thread *t) return OPAL_UNSUPPORTED; lock(&c->dctl_lock); - if (c->special_wakeup_count == 0) + if (!c->special_wakeup_count) + goto out; + if (c->special_wakeup_count == 1) rc = p9_core_clear_special_wakeup(c); if (!rc) c->special_wakeup_count--; +out: unlock(&c->dctl_lock); return rc; |