diff options
| author | Marc Kleine-Budde <mkl@pengutronix.de> | 2026-03-19 19:55:41 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-04-07 13:54:29 +0300 |
| commit | ca431d50bf62cca8f0a502e76b3d75ee371af32c (patch) | |
| tree | afeaa4d99e2547a2db167245f97551b2c213da70 | |
| parent | c6e178460434e6dad2b948f501cc6811a2e6de8f (diff) | |
| download | linux-ca431d50bf62cca8f0a502e76b3d75ee371af32c.tar.xz | |
spi: spi-fsl-lpspi: fsl_lpspi_setup_transfer(): remove useless spi_transfer NULL pointer check
fsl_lpspi_setup_transfer() is either called via:
| fsl_lpspi_prepare_message()
| -> fsl_lpspi_setup_transfer()
or
| -> spi_transfer_one_message()
| -> controller->transfer_one == fsl_lpspi_transfer_one()
| -> fsl_lpspi_setup_transfer()
The first call path already has a spi_transfer NULL pointer check, the
second one explicitly iterates over all spi_transfer of the spi_message.
Simplify the code by removing the useless NULL pointer check.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-7-02b56c5d44a8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/spi/spi-fsl-lpspi.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 25e657227013..904195f7b050 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -471,9 +471,6 @@ static int fsl_lpspi_setup_transfer(struct spi_controller *controller, struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(spi->controller); - if (t == NULL) - return -EINVAL; - fsl_lpspi->config.mode = spi->mode; fsl_lpspi->config.bpw = t->bits_per_word; fsl_lpspi->config.speed_hz = t->speed_hz; |
