diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-03-12 16:34:21 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2015-03-25 05:08:41 -0400 |
commit | 8a87dc55f75f19ffdbb52066afea1b633577c79f (patch) | |
tree | 480a71cc7a26373874fd12906a14c5f4293356c0 | |
parent | d3f9db00d04ef1388d7ff24130b9a95099ce1542 (diff) |
UBIFS: simplify returns
Directly return recover_head() and ubifs_leb_unmap()
instead of storing value in err and testing it.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | fs/ubifs/recovery.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index c640938f62f0..13ca4dbc4d19 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c | |||
@@ -975,11 +975,8 @@ int ubifs_recover_inl_heads(struct ubifs_info *c, void *sbuf) | |||
975 | return err; | 975 | return err; |
976 | 976 | ||
977 | dbg_rcvry("checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs); | 977 | dbg_rcvry("checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs); |
978 | err = recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf); | ||
979 | if (err) | ||
980 | return err; | ||
981 | 978 | ||
982 | return 0; | 979 | return recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf); |
983 | } | 980 | } |
984 | 981 | ||
985 | /** | 982 | /** |
@@ -1004,10 +1001,7 @@ static int clean_an_unclean_leb(struct ubifs_info *c, | |||
1004 | 1001 | ||
1005 | if (len == 0) { | 1002 | if (len == 0) { |
1006 | /* Nothing to read, just unmap it */ | 1003 | /* Nothing to read, just unmap it */ |
1007 | err = ubifs_leb_unmap(c, lnum); | 1004 | return ubifs_leb_unmap(c, lnum); |
1008 | if (err) | ||
1009 | return err; | ||
1010 | return 0; | ||
1011 | } | 1005 | } |
1012 | 1006 | ||
1013 | err = ubifs_leb_read(c, lnum, buf, offs, len, 0); | 1007 | err = ubifs_leb_read(c, lnum, buf, offs, len, 0); |