Commit c98f6bcc authored by Luis Ubieda's avatar Luis Ubieda Committed by Chris Friedt
Browse files

spi: rtio: Add validation for NULL tx and rx buffers



In addition to #94710 fixes, SPI RTIO currently fails existing spi
loopback testcase: test_spi_null_tx_rx_buf_set.

This plus the referenced PR enable RTIO-enabled drivers to pass the
testsuite.

Signed-off-by: default avatarLuis Ubieda <luisf@croxel.com>
parent 1e7e1dbb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -415,6 +415,10 @@ int spi_rtio_transceive(struct spi_rtio *ctx,
	int err = 0;
	int ret;

	if (tx_bufs == NULL && rx_bufs == NULL) {
		return -EINVAL;
	}

	dt_spec->config = *config;

	ret = spi_rtio_copy(ctx->r, &ctx->iodev, tx_bufs, rx_bufs, &sqe);