From: Heinrich Schuchardt Date: Sun, 18 Mar 2018 11:53:35 +0000 (+0100) Subject: spi: lpc32xx: simplify logical expression X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=266580612f16a4a45cced1bede7191b56ad4afd4;p=u-boot.git spi: lpc32xx: simplify logical expression A & A & B == A & B Signed-off-by: Heinrich Schuchardt Reviewed-by: Jagan Teki --- diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c index e6c876da07..ce12eee657 100644 --- a/drivers/spi/lpc32xx_ssp.c +++ b/drivers/spi/lpc32xx_ssp.c @@ -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;