Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0319d499 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mark Brown
Browse files

spi: fsl-espi: fix status handling in fsl_espi_do_one_msg



If an error occurred during message handling return this error instead
of always returning 0 and align the code with the generic
implementation in spi_transfer_one_message.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e33a3ade
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -381,9 +381,12 @@ static int fsl_espi_do_one_msg(struct spi_master *master,
		ret = fsl_espi_rw_trans(m, &espi_trans, rx_buf);

	m->actual_length = espi_trans.actual_length;
	if (m->status == -EINPROGRESS)
		m->status = ret;

	spi_finalize_current_message(master);
	return 0;

	return ret;
}

static int fsl_espi_setup(struct spi_device *spi)