Remove duplicate checks on status from mci_data_read and mci_data_write
which are guaranteed to be true as exiting the above do..while loop
above requires that to be so.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
goto io_fail;
} while (!(status & MMCI_BIT(RXRDY)));
- if (status & MMCI_BIT(RXRDY)) {
- *data = readl(&mci->rdr);
- status = 0;
- }
+ *data = readl(&mci->rdr);
+ status = 0;
+
io_fail:
return status;
}
goto io_fail;
} while (!(status & MMCI_BIT(TXRDY)));
- if (status & MMCI_BIT(TXRDY)) {
- writel(*data, &mci->tdr);
- status = 0;
- }
+ writel(*data, &mci->tdr);
+ status = 0;
+
io_fail:
return status;
}