]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
zynq: spi: Remove unnecessary error condition
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 15 Apr 2015 11:13:28 +0000 (13:13 +0200)
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Wed, 22 Apr 2015 11:19:51 +0000 (16:49 +0530)
Removed the unnecessary error check from spi_xfer
as the bitlen zero is possible now to deassert the
chip select for which no data is required to be transfered.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/spi/zynq_spi.c

index 5da87591ceef3f530edf4bbc45b95263b53d28bf..e9129da79d99825b9d88c7bc893d3de0f9700feb 100644 (file)
@@ -227,9 +227,6 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
        debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
              slave->bus, slave->cs, bitlen, len, flags);
 
-       if (bitlen == 0)
-               return -1;
-
        if (bitlen % 8) {
                debug("spi_xfer: Non byte aligned SPI transfer\n");
                return -1;