Return a proper status code from fsl_espi_bufs instead of returning
the number of remaining words and let the caller evaluate it.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
/* disable rx ints */
mpc8xxx_spi_write_reg(®_base->mask, 0);
- return mpc8xxx_spi->count;
+ return mpc8xxx_spi->count > 0 ? -EMSGSIZE : 0;
}
static int fsl_espi_do_trans(struct spi_message *m, struct spi_transfer *trans)
if (trans->len)
ret = fsl_espi_bufs(spi, trans);
- if (ret)
- ret = -EMSGSIZE;
-
if (trans->delay_usecs)
udelay(trans->delay_usecs);