Commit 2b947137 authored by Keiji Hayashibara's avatar Keiji Hayashibara Committed by Mark Brown

spi: uniphier: fix zero-length transfer

The zero-length transfer results in timeout error because
the transfer doesn't start.
This commit modified to return success in this case.
Signed-off-by: default avatarKeiji Hayashibara <hayashibara.keiji@socionext.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e4671df0
......@@ -331,6 +331,10 @@ static int uniphier_spi_transfer_one(struct spi_master *master,
struct device *dev = master->dev.parent;
unsigned long time_left;
/* Terminate and return success for 0 byte length transfer */
if (!t->len)
return 0;
uniphier_spi_setup_transfer(spi, t);
reinit_completion(&priv->xfer_done);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment