Message ID | 20181116003938.2BAB6440079@finisterre.ee.mobilebroadband (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Applied "spi: Fix core transfer waits after slave support" to the spi tree | expand |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 498d3b9bf3ae..430ad637c643 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1114,9 +1114,11 @@ static int spi_transfer_one_message(struct spi_controller *ctlr, goto out; } - ret = spi_transfer_wait(ctlr, msg, xfer); - if (ret < 0) - msg->status = ret; + if (ret > 0) { + ret = spi_transfer_wait(ctlr, msg, xfer); + if (ret < 0) + msg->status = ret; + } } else { if (xfer->len) dev_err(&msg->spi->dev,