* [PATCH V2 linux-next] UBIFS: simplify returns
@ 2015-03-12 20:34 Fabian Frederick
2015-03-13 15:32 ` Geert Uytterhoeven
2015-03-25 8:42 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Frederick @ 2015-03-12 20:34 UTC (permalink / raw)
To: linux-kernel
Cc: geert, Fabian Frederick, Artem Bityutskiy, Adrian Hunter, linux-mtd
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>
---
V2: Keep curly braces around comment + 1 line in if.
(suggested by Geert Uytterhoeven)
fs/ubifs/recovery.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index c640938..13ca4db 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);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 linux-next] UBIFS: simplify returns
2015-03-12 20:34 [PATCH V2 linux-next] UBIFS: simplify returns Fabian Frederick
@ 2015-03-13 15:32 ` Geert Uytterhoeven
2015-03-25 8:42 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-03-13 15:32 UTC (permalink / raw)
To: Fabian Frederick
Cc: linux-kernel, Artem Bityutskiy, Adrian Hunter, MTD Maling List
On Thu, Mar 12, 2015 at 9:34 PM, Fabian Frederick <fabf@skynet.be> wrote:
> 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>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 linux-next] UBIFS: simplify returns
2015-03-12 20:34 [PATCH V2 linux-next] UBIFS: simplify returns Fabian Frederick
2015-03-13 15:32 ` Geert Uytterhoeven
@ 2015-03-25 8:42 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2015-03-25 8:42 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, geert, Adrian Hunter, linux-mtd
On Thu, 2015-03-12 at 21:34 +0100, Fabian Frederick wrote:
> 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>
> ---
Pushed to linux-ubifs/master, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-25 8:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 20:34 [PATCH V2 linux-next] UBIFS: simplify returns Fabian Frederick
2015-03-13 15:32 ` Geert Uytterhoeven
2015-03-25 8:42 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®