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

Commit 8a87dc55 authored by Fabian Frederick's avatar Fabian Frederick Committed by Artem Bityutskiy
Browse files

UBIFS: simplify returns



Directly return recover_head() and ubifs_leb_unmap()
instead of storing value in err and testing it.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent d3f9db00
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -975,11 +975,8 @@ int ubifs_recover_inl_heads(struct ubifs_info *c, void *sbuf)
		return err;

	dbg_rcvry("checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs);
	err = recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf);
	if (err)
		return err;

	return 0;
	return recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf);
}

/**
@@ -1004,10 +1001,7 @@ static int clean_an_unclean_leb(struct ubifs_info *c,

	if (len == 0) {
		/* Nothing to read, just unmap it */
		err = ubifs_leb_unmap(c, lnum);
		if (err)
			return err;
		return 0;
		return ubifs_leb_unmap(c, lnum);
	}

	err = ubifs_leb_read(c, lnum, buf, offs, len, 0);