summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorLi zeming <zeming@nfschina.com>2023-10-27 09:55:33 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-11 22:06:15 +0100
commitbbeaa4691fa8682e2fe2e87f28d5fce39805fa68 (patch)
tree6d646f0c59619451f6110f7766c901d85edd9840 /kernel/power
parenta1ca8295ee53a2fc57085fae26df37228c655791 (diff)
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>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index a2cb0babb5ec..68973ca2cf07 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -451,7 +451,7 @@ err_close:
static int swap_write_page(struct swap_map_handle *handle, void *buf,
struct hib_bio_batch *hb)
{
- int error = 0;
+ int error;
sector_t offset;
if (!handle->cur)