diff options
| author | Fabian Frederick <[email protected]> | 2015-03-12 20:34:21 +0000 |
|---|---|---|
| committer | Artem Bityutskiy <[email protected]> | 2015-03-25 09:08:41 +0000 |
| commit | 8a87dc55f75f19ffdbb52066afea1b633577c79f (patch) | |
| tree | 480a71cc7a26373874fd12906a14c5f4293356c0 | |
| parent | UBIFS: Fix trivial typos in comments (diff) | |
| download | kernel-8a87dc55f75f19ffdbb52066afea1b633577c79f.tar.gz kernel-8a87dc55f75f19ffdbb52066afea1b633577c79f.zip | |
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 <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
| -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) 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); |
