Skip to content

Commit

Permalink
PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
Browse files Browse the repository at this point in the history
The Finish label in suspend_freeze_processes() is in fact unnecessary
and makes the function look more complicated than it really is, so
remove that label (along with a few empty lines).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
  • Loading branch information
Rafael J. Wysocki committed Feb 13, 2012
1 parent 6c83b48 commit 6f585f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/power/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,24 +234,21 @@ static inline int suspend_freeze_processes(void)
int error;

error = freeze_processes();

/*
* freeze_processes() automatically thaws every task if freezing
* fails. So we need not do anything extra upon error.
*/
if (error)
goto Finish;
return error;

error = freeze_kernel_threads();

/*
* freeze_kernel_threads() thaws only kernel threads upon freezing
* failure. So we have to thaw the userspace tasks ourselves.
*/
if (error)
thaw_processes();

Finish:
return error;
}

Expand Down

0 comments on commit 6f585f7

Please sign in to comment.