aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/rfd_ftl.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-02-13 06:21:44 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-03-11 01:42:25 -0400
commitda22b89386e8d4dc89525801dfe60f5f8c29668d (patch)
tree534b9359d62dac3f987933391203dd9c761deae0 /drivers/mtd/rfd_ftl.c
parent74414a945ac992c71766bbf76718c7fddbcbd016 (diff)
mtd: remove some duplicative checks
"rc" is an error code here, no need to check it a second time. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/rfd_ftl.c')
-rw-r--r--drivers/mtd/rfd_ftl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 233b946e5d66..d1cbf26db2c0 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -602,8 +602,7 @@ static int mark_sector_deleted(struct partition *part, u_long old_addr)
602 if (rc) { 602 if (rc) {
603 printk(KERN_ERR PREFIX "error writing '%s' at " 603 printk(KERN_ERR PREFIX "error writing '%s' at "
604 "0x%lx\n", part->mbd.mtd->name, addr); 604 "0x%lx\n", part->mbd.mtd->name, addr);
605 if (rc) 605 goto err;
606 goto err;
607 } 606 }
608 if (block == part->current_block) 607 if (block == part->current_block)
609 part->header_cache[offset + HEADER_MAP_OFFSET] = del; 608 part->header_cache[offset + HEADER_MAP_OFFSET] = del;
@@ -675,8 +674,7 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf,
675 if (rc) { 674 if (rc) {
676 printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n", 675 printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n",
677 part->mbd.mtd->name, addr); 676 part->mbd.mtd->name, addr);
678 if (rc) 677 goto err;
679 goto err;
680 } 678 }
681 679
682 part->sector_map[sector] = addr; 680 part->sector_map[sector] = addr;
@@ -695,8 +693,7 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf,
695 if (rc) { 693 if (rc) {
696 printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n", 694 printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n",
697 part->mbd.mtd->name, addr); 695 part->mbd.mtd->name, addr);
698 if (rc) 696 goto err;
699 goto err;
700 } 697 }
701 block->used_sectors++; 698 block->used_sectors++;
702 block->free_sectors--; 699 block->free_sectors--;