Skip to contentSkip to conversation

dm bufio: simplify the return expression of skip_metadata()

PATCH New Qinglang Miao 1 participant 1 message Sep 21, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm bufio: simplify the return expression of skip_metadata()

Simplify the return expression.

---
 drivers/md/dm-snap-persistent.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/md/dm-snap-persistent.c +1 -6
index 63fab7c76..74b483fed 100644
@@ -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)
Signature · 1 line
2.23.0