[U-Boot] [PATCH 1/1] spi: lpc32xx: simplify logical expression
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Mar 18 11:53:35 UTC 2018
A & A & B == A & B
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
drivers/spi/lpc32xx_ssp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c
index e2a593b934..b8bce3d6e8 100644
--- a/drivers/spi/lpc32xx_ssp.c
+++ b/drivers/spi/lpc32xx_ssp.c
@@ -130,7 +130,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
int status = readl(&lslave->regs->sr);
if ((idx_out < bytelen) && (status & SSP_SR_TNF))
writel(((u8 *)dout)[idx_out++], &lslave->regs->data);
- if ((idx_in < bytelen) && (status & status & SSP_SR_RNE))
+ if ((idx_in < bytelen) && (status & SSP_SR_RNE))
((u8 *)din)[idx_in++] = readl(&lslave->regs->data);
if (get_timer(start_time) >= CONFIG_LPC32XX_SSP_TIMEOUT)
return -1;
--
2.16.2
More information about the U-Boot
mailing list