lkml.org 
[lkml]   [2023]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] power: swap: Assign a value when removing the 'error' definition
Date
'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>
---
kernel/power/swap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 74edbce2320ba..90bb583c57bf7 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -450,7 +450,7 @@ static int get_swap_writer(struct swap_map_handle *handle)
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)
--
2.18.2
\
 
 \ /
  Last update: 2023-10-27 03:56    [W:0.052 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site