mirror of
https://github.com/torvalds/linux.git
synced 2024-09-21 15:33:19 +00:00
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>
This commit is contained in:
parent
74414a945a
commit
da22b89386
|
@ -602,7 +602,6 @@ static int mark_sector_deleted(struct partition *part, u_long old_addr)
|
|||
if (rc) {
|
||||
printk(KERN_ERR PREFIX "error writing '%s' at "
|
||||
"0x%lx\n", part->mbd.mtd->name, addr);
|
||||
if (rc)
|
||||
goto err;
|
||||
}
|
||||
if (block == part->current_block)
|
||||
|
@ -675,7 +674,6 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf,
|
|||
if (rc) {
|
||||
printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n",
|
||||
part->mbd.mtd->name, addr);
|
||||
if (rc)
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@ -695,7 +693,6 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf,
|
|||
if (rc) {
|
||||
printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n",
|
||||
part->mbd.mtd->name, addr);
|
||||
if (rc)
|
||||
goto err;
|
||||
}
|
||||
block->used_sectors++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user