spi: lpc32xx: simplify logical expression
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 18 Mar 2018 11:53:35 +0000 (12:53 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 16 May 2018 13:49:06 +0000 (19:19 +0530)
A & A & B == A & B

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/lpc32xx_ssp.c

index e6c876da07b41f78f2f43804f72df230c9e98a49..ce12eee65715890429258b81aaef45cbf16521fe 100644 (file)
@@ -129,7 +129,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;