Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li zeming and committed by
Rafael J. Wysocki
4ac934b1 bbeaa469

+1 -1
+1 -1
kernel/power/snapshot.c
··· 2778 2778 int snapshot_write_next(struct snapshot_handle *handle) 2779 2779 { 2780 2780 static struct chain_allocator ca; 2781 - int error = 0; 2781 + int error; 2782 2782 2783 2783 next: 2784 2784 /* Check if we have already loaded the entire image */