projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1050643
)
[MTD] Remove embedded return in RFD FTL.
author
akpm@linux-foundation.org
<akpm@linux-foundation.org>
Fri, 20 Jul 2007 18:56:19 +0000
(11:56 -0700)
committer
David Woodhouse
<dwmw2@infradead.org>
Mon, 23 Jul 2007 11:06:52 +0000
(12:06 +0100)
embedded returns are evil.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/rfd_ftl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/rfd_ftl.c
b/drivers/mtd/rfd_ftl.c
index 006c03aacb55d1241fc99cae8420c7b8383dda3d..823fba4e6d2fa99c5c5ea2049edd820c9fda1c5c 100644
(file)
--- a/
drivers/mtd/rfd_ftl.c
+++ b/
drivers/mtd/rfd_ftl.c
@@
-779,10
+779,8
@@
static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
else {
if (!mtd->erasesize) {
printk(KERN_WARNING PREFIX "please provide block_size");
- kfree(part);
- return;
- }
- else
+ goto out;
+ } else
part->block_size = mtd->erasesize;
}
@@
-804,7
+802,7
@@
static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
if (!add_mtd_blktrans_dev((void*)part))
return;
}
-
+out:
kfree(part);
}