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 <zeming@nfschina.com>
[ rjw: Subject and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Li zeming 2023-10-24 10:04:34 +08:00 committed by Rafael J. Wysocki
parent bbeaa4691f
commit 4ac934b1aa

View File

@ -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 */