Skip to content

Commit bbeaa46

Browse files
Li zemingrafaeljw
authored andcommitted
PM: hibernate: Do not initialize error in swap_write_page()
'error' first receives the function result before it is used, and it does not need to be assigned a value during definition. Signed-off-by: Li zeming <[email protected]> [ rjw: Subject rewrite ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a1ca829 commit bbeaa46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/swap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int get_swap_writer(struct swap_map_handle *handle)
451451
static int swap_write_page(struct swap_map_handle *handle, void *buf,
452452
struct hib_bio_batch *hb)
453453
{
454-
int error = 0;
454+
int error;
455455
sector_t offset;
456456

457457
if (!handle->cur)

0 commit comments

Comments
 (0)