spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one()
[linux-2.6-microblaze.git] / drivers / spi / spi-synquacer.c
index 47cbe73..dc188f9 100644 (file)
@@ -472,10 +472,9 @@ static int synquacer_spi_transfer_one(struct spi_master *master,
                read_fifo(sspi);
        }
 
-       if (status < 0) {
-               dev_err(sspi->dev, "failed to transfer. status: 0x%x\n",
-                       status);
-               return status;
+       if (status == 0) {
+               dev_err(sspi->dev, "failed to transfer. Timeout.\n");
+               return -ETIMEDOUT;
        }
 
        return 0;