summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/denali.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-07-21 19:07:31 -0700
committerBrian Norris <computersforpeace@gmail.com>2014-08-19 11:53:08 -0700
commitc115add9d073752d38f6517882dfeafe76fc4458 (patch)
tree25469ca16e81dd4c8164bff8cc66eaca62326bcd /drivers/mtd/nand/denali.c
parent31f754628cbb12c983600f22d9f0fed50dfe2134 (diff)
mtd: nand: denali: set proper error code on timeout
The condition "if (irq_status == 0)" already ensures that one half of the ternary ?: is dead. I think this should probably actually be a FAIL, not a PASS. Caught by Coverity. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Jamie Iles <jamie@jamieiles.com>
Diffstat (limited to 'drivers/mtd/nand/denali.c')
-rw-r--r--drivers/mtd/nand/denali.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index da0fcc224739..4885a0f573cd 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1062,9 +1062,7 @@ static int write_page(struct mtd_info *mtd, struct nand_chip *chip,
dev_err(denali->dev,
"timeout on write_page (type = %d)\n",
raw_xfer);
- denali->status =
- (irq_status & INTR_STATUS__PROGRAM_FAIL) ?
- NAND_STATUS_FAIL : PASS;
+ denali->status = NAND_STATUS_FAIL;
}
denali_enable_dma(denali, false);