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 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 <zeming@nfschina.com>
[ rjw: Subject rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Li zeming and committed by
Rafael J. Wysocki
bbeaa469 a1ca8295

+1 -1
+1 -1
kernel/power/swap.c
··· 451 451 static int swap_write_page(struct swap_map_handle *handle, void *buf, 452 452 struct hib_bio_batch *hb) 453 453 { 454 - int error = 0; 454 + int error; 455 455 sector_t offset; 456 456 457 457 if (!handle->cur)