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 <andrew.goodbody@linaro.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
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)