Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 654a01b7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jens Axboe
Browse files

lightnvm: Fix error handling



According to error handling in this function, it is likely that going to
'out' was expected here.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMatias Bjørling <matias@cnexlabs.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent a88086e0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1275,8 +1275,10 @@ static int rrpc_bb_discovery(struct nvm_tgt_dev *dev, struct rrpc_lun *rlun)
	}

	nr_blks = nvm_bb_tbl_fold(dev->parent, blks, nr_blks);
	if (nr_blks < 0)
		return nr_blks;
	if (nr_blks < 0) {
		ret = nr_blks;
		goto out;
	}

	for (i = 0; i < nr_blks; i++) {
		if (blks[i] == NVM_BLK_T_FREE)