[PATCH -next] dm bufio: simplify the return expression of skip_metadata()
From: Qinglang Miao
Date: Mon Sep 21 2020 - 09:10:09 EST
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
---
drivers/md/dm-snap-persistent.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 63fab7c76..74b483fed 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -284,16 +284,11 @@ static void skip_metadata(struct pstore *ps)
*/
static int area_io(struct pstore *ps, int op, int op_flags)
{
- int r;
chunk_t chunk;
chunk = area_location(ps, ps->current_area);
- r = chunk_io(ps, ps->area, chunk, op, op_flags, 0);
- if (r)
- return r;
-
- return 0;
+ return chunk_io(ps, ps->area, chunk, op, op_flags, 0);
}
static void zero_memory_area(struct pstore *ps)
--
2.23.0