Skip to content

Commit 4ac934b

Browse files
Li zemingrafaeljw
authored andcommitted
PM: hibernate: Do not initialize error in snapshot_write_next()
The error variable in snapshot_write_next() gets a value before it is used, so don't initialize it to 0 upfront. Signed-off-by: Li zeming <[email protected]> [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent bbeaa46 commit 4ac934b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/snapshot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,7 @@ static void *get_buffer(struct memory_bitmap *bm, struct chain_allocator *ca)
27782778
int snapshot_write_next(struct snapshot_handle *handle)
27792779
{
27802780
static struct chain_allocator ca;
2781-
int error = 0;
2781+
int error;
27822782

27832783
next:
27842784
/* Check if we have already loaded the entire image */

0 commit comments

Comments
 (0)