]> err.no Git - linux-2.6/commitdiff
[MTD] Remove embedded return in RFD FTL.
authorakpm@linux-foundation.org <akpm@linux-foundation.org>
Fri, 20 Jul 2007 18:56:19 +0000 (11:56 -0700)
committerDavid 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

index 006c03aacb55d1241fc99cae8420c7b8383dda3d..823fba4e6d2fa99c5c5ea2049edd820c9fda1c5c 100644 (file)
@@ -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);
 }