Skip to contentSkip to conversation

lightnvm: pblk: Fix error return code in pblk_recov_pad_lineq()

PATCH New Zhen Lei 1 participant 1 message May 15, 2021 Block layer

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 lightnvm: pblk: Fix error return code in pblk_recov_pad_lineq()

Fix to return -EFAULT from the error handling case instead of 0, as done elsewhere in this function.

Fixes ee8d5c1ad54e ("lightnvm: pblk: remove target using async. I/Os")
---
 drivers/lightnvm/pblk-recovery.c | 1 +
 1 file changed, 1 insertion(+)
drivers/lightnvm/pblk-recovery.c +1 -0
index 0e6f0c76e93027a..0772bd46bf61495 100644
@@ -207,6 +207,7 @@ static int pblk_recov_pad_line(struct pblk *pblk, struct pblk_line *line,
 next_pad_rq:
 	rq_ppas = pblk_calc_secs(pblk, left_ppas, 0, false);
 	if (rq_ppas < pblk->min_write_pgs) {
+		ret = -EFAULT;
 		pblk_err(pblk, "corrupted pad line %d\n", line->id);
 		goto fail_complete;
 	}
Signature · 1 line
2.26.0.106.g9fadedd