spi: Remove unneded check for orig_nents
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 7 May 2024 20:10:27 +0000 (23:10 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 8 May 2024 02:39:46 +0000 (11:39 +0900)
commit8cc3bad9d9d6a4735a8c8998c6daa1ef31cbf708
tree64b5f244ba0c4dd6edc84ce9701857a5ecc28f17
parenteab80a2ee46bb362e2c4434cf0da96d3a6bda544
spi: Remove unneded check for orig_nents

Both dma_unmap_sgtable() and sg_free_table() in spi_unmap_buf_attrs()
have checks for orig_nents against 0. No need to duplicate this.
All the same applies to other DMA mapping API calls.

Also note, there is no other user in the kernel that does this kind of
checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240507201028.564630-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c