mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 12:21:03 +02:00
mtd: nand: raw: atmel: remove unnecessary return value
The condition 'ret' is always true as it is never set to other than -EIO. Remove 'ret' and the condition for copy. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Michael Trimarchi <micheal@amarulasolutions.com>
This commit is contained in:
parent
75ad667aad
commit
bb736358e5
@ -568,12 +568,9 @@ static void atmel_nfc_copy_to_sram(struct nand_chip *chip, const u8 *buf,
|
||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||
struct atmel_nand *nand = to_atmel_nand(chip);
|
||||
struct atmel_hsmc_nand_controller *nc;
|
||||
int ret = -EIO;
|
||||
|
||||
nc = to_hsmc_nand_controller(nand->controller);
|
||||
|
||||
if (ret)
|
||||
memcpy_toio(nc->sram.virt, buf, mtd->writesize);
|
||||
memcpy_toio(nc->sram.virt, buf, mtd->writesize);
|
||||
|
||||
if (oob_required)
|
||||
memcpy_toio(nc->sram.virt + mtd->writesize, chip->oob_poi,
|
||||
@ -586,12 +583,9 @@ static void atmel_nfc_copy_from_sram(struct nand_chip *chip, u8 *buf,
|
||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||
struct atmel_nand *nand = to_atmel_nand(chip);
|
||||
struct atmel_hsmc_nand_controller *nc;
|
||||
int ret = -EIO;
|
||||
|
||||
nc = to_hsmc_nand_controller(nand->controller);
|
||||
|
||||
if (ret)
|
||||
memcpy_fromio(buf, nc->sram.virt, mtd->writesize);
|
||||
memcpy_fromio(buf, nc->sram.virt, mtd->writesize);
|
||||
|
||||
if (oob_required)
|
||||
memcpy_fromio(chip->oob_poi, nc->sram.virt + mtd->writesize,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user