Skip to content

Commit

Permalink
PM: hibernate: Remove blk_status_to_errno in hib_wait_io
Browse files Browse the repository at this point in the history
blk_status_to_errno doesn't appear to perform extra work besides
converting blk_status_t to integer. This patch removes that unnecessary
conversion as the return type of the function is blk_status_t.

Signed-off-by: Falla Coulibaly <fallacoulibalyz@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
fallazc authored and rafaeljw committed Sep 15, 2021
1 parent bfcc1e6 commit 5416da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/power/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static blk_status_t hib_wait_io(struct hib_bio_batch *hb)
* a plug will flush the plug list before sleeping.
*/
wait_event(hb->wait, atomic_read(&hb->count) == 0);
return blk_status_to_errno(hb->error);
return hb->error;
}

/*
Expand Down

0 comments on commit 5416da0

Please sign in to comment.