summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorWang chaodong <chaodong@nfschina.com>2023-10-20 16:51:06 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-11 22:02:48 +0100
commita1ca8295ee53a2fc57085fae26df37228c655791 (patch)
treee5d84cf512764b51bbfe48e436e8a67225dd830f /kernel/power
parenta39b6ac3781d46ba18193c9dbb2110f31e9bffe9 (diff)
PM: hibernate: Drop unnecessary local variable initialization
It is not necessary to intialize the error variable in create_basic_memory_bitmaps(), because it is only read after being assigned a value. Signed-off-by: Wang chaodong <chaodong@nfschina.com> [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 50a15408c3fc..71b2f12ed3b5 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1119,7 +1119,7 @@ static void mark_nosave_pages(struct memory_bitmap *bm)
int create_basic_memory_bitmaps(void)
{
struct memory_bitmap *bm1, *bm2;
- int error = 0;
+ int error;
if (forbidden_pages_map && free_pages_map)
return 0;