diff --git a/src/core/slice.c b/src/core/slice.c index 2e43c00119..c453aa033e 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -389,11 +389,7 @@ static int slice_freezer_action(Unit *s, FreezerAction action) { return r; } - r = unit_cgroup_freezer_action(s, action); - if (r < 0) - return r; - - return 1; + return unit_cgroup_freezer_action(s, action); } static int slice_freeze(Unit *s) { diff --git a/src/core/unit.c b/src/core/unit.c index fcfc9bc8d2..b0756bc6f4 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5849,6 +5849,8 @@ static int unit_freezer_action(Unit *u, FreezerAction action) { if (r <= 0) return r; + assert(IN_SET(u->freezer_state, FREEZER_FREEZING, FREEZER_THAWING)); + return 1; }