Commit 4ac934b1 authored by Li zeming's avatar Li zeming Committed by Rafael J. Wysocki
Browse files

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: default avatarLi zeming <zeming@nfschina.com>
[ rjw: Subject and changelog rewrite ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bbeaa469
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2778,7 +2778,7 @@ static void *get_buffer(struct memory_bitmap *bm, struct chain_allocator *ca)
int snapshot_write_next(struct snapshot_handle *handle)
{
	static struct chain_allocator ca;
	int error = 0;
	int error;

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