diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-01 10:54:05 +0100 |
|---|---|---|
| committer | Michael Trimarchi <[email protected]> | 2025-08-03 10:22:04 +0200 |
| commit | 2756de5213a1a88fae236d7be217c882b5daef9f (patch) | |
| tree | 601cd540c8aebb390019cd2c236b059de8ed544b | |
| parent | ebf8aaf7afdeb306b0fb85be2226a00aef18162f (diff) | |
mtd: rawnand: denali: Remove always true test
In denali_wait_for_irq the code will either return from inside the while
loop or exit with time_left being 0. The following test for time_left
being 0 is guranteed to be true so remove the test and the following
unreachable code.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
Reviewed-by: Michael Trimarchi <[email protected]>
| -rw-r--r-- | drivers/mtd/nand/raw/denali.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index b2401116689..39cb641e0b3 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -173,13 +173,9 @@ static uint32_t denali_wait_for_irq(struct denali_nand_info *denali, time_left--; } - if (!time_left) { - dev_err(denali->dev, "timeout while waiting for irq 0x%x\n", - irq_mask); - return 0; - } - - return denali->irq_status; + dev_err(denali->dev, "timeout while waiting for irq 0x%x\n", + irq_mask); + return 0; } static uint32_t denali_check_irq(struct denali_nand_info *denali) |
