Skip to content

Commit

Permalink
[MTD] Remove embedded return in RFD FTL.
Browse files Browse the repository at this point in the history
embedded returns are evil.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
akpm@linux-foundation.org authored and David Woodhouse committed Jul 23, 2007
1 parent 1050643 commit 030f9e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/mtd/rfd_ftl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 030f9e1

Please sign in to comment.