diff options
Diffstat (limited to 'drivers/mtd/devices/bcm47xxsflash.c')
-rw-r--r-- | drivers/mtd/devices/bcm47xxsflash.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index e2bd81817df4..9baa81b8780c 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c @@ -68,7 +68,6 @@ static int bcm47xxsflash_poll(struct bcm47xxsflash *b47s, int timeout) static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) { struct bcm47xxsflash *b47s = mtd->priv; - int err; switch (b47s->type) { case BCM47XXSFLASH_TYPE_ST: @@ -89,16 +88,7 @@ static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) break; } - err = bcm47xxsflash_poll(b47s, HZ); - if (err) - erase->state = MTD_ERASE_FAILED; - else - erase->state = MTD_ERASE_DONE; - - if (erase->callback) - erase->callback(erase); - - return err; + return bcm47xxsflash_poll(b47s, HZ); } static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len, |