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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
a1ca8295ee
commit
bbeaa4691f
+1
-1
@@ -451,7 +451,7 @@ err_close:
|
|||||||
static int swap_write_page(struct swap_map_handle *handle, void *buf,
|
static int swap_write_page(struct swap_map_handle *handle, void *buf,
|
||||||
struct hib_bio_batch *hb)
|
struct hib_bio_batch *hb)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error;
|
||||||
sector_t offset;
|
sector_t offset;
|
||||||
|
|
||||||
if (!handle->cur)
|
if (!handle->cur)
|
||||||
|
|||||||
Reference in New Issue
Block a user