Skip to content

Commit

Permalink
spi: s3c64xx: correct dma_chan pointer initialization
Browse files Browse the repository at this point in the history
Use NULL for dma channel pointer initialization instead of plain integer.

sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-s3c64xx.c:387:34: sparse: sparse: Using plain integer as NULL pointer
   drivers/spi/spi-s3c64xx.c:388:34: sparse: sparse: Using plain integer as NULL pointer

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 82295bc ("spi: s3c64xx: move dma_release_channel to unprepare")
Fixes: f52b03c ("spi: s3c64xx: requests spi-dma channel only during data transfer")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Andi Shyti <andi@etezian.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220808004851.25122-1-chanho61.park@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Chanho Park authored and Mark Brown committed Aug 15, 2022
1 parent fba933c commit dad57a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
if (sdd->rx_dma.ch && sdd->tx_dma.ch) {
dma_release_channel(sdd->rx_dma.ch);
dma_release_channel(sdd->tx_dma.ch);
sdd->rx_dma.ch = 0;
sdd->tx_dma.ch = 0;
sdd->rx_dma.ch = NULL;
sdd->tx_dma.ch = NULL;
}

return 0;
Expand Down

0 comments on commit dad57a5

Please sign in to comment.