From: akpm@linux-foundation.org Date: Fri, 20 Jul 2007 18:56:19 +0000 (-0700) Subject: [MTD] Remove embedded return in RFD FTL. X-Git-Tag: v2.6.24-rc1~1364^2~50 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=030f9e13bec9aaae1def86c23963a1a825ccdab5;p=linux-2.6 [MTD] Remove embedded return in RFD FTL. embedded returns are evil. Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index 006c03aacb..823fba4e6d 100644 --- 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); }