summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-s3c64xx.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-06-12 21:34:28 +0100
committerMark Brown <broonie@kernel.org>2022-06-13 15:55:46 +0100
commit845d3fd8a0aadf5dd97e6d345d3df4bf80099e69 (patch)
tree54bc04bf891cf69d29e54c213b6dd9cbe95e2da0 /drivers/spi/spi-s3c64xx.c
parent116679aef2f92d535ea8049ef2a610bc73f94660 (diff)
downloadlwn-845d3fd8a0aadf5dd97e6d345d3df4bf80099e69.tar.gz
lwn-845d3fd8a0aadf5dd97e6d345d3df4bf80099e69.zip
spi: s3c64xx: set pointers to null using NULL rather than 0
There are pointers being set to null using use. Use NULL instead. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Link: https://lore.kernel.org/r/20220612203428.2754823-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r--drivers/spi/spi-s3c64xx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 0ce58105dbac..819b660dae82 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -354,7 +354,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
if (IS_ERR(sdd->rx_dma.ch)) {
dev_err(&sdd->pdev->dev, "Failed to get RX DMA channel\n");
- sdd->rx_dma.ch = 0;
+ sdd->rx_dma.ch = NULL;
return 0;
}
@@ -362,8 +362,8 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
if (IS_ERR(sdd->tx_dma.ch)) {
dev_err(&sdd->pdev->dev, "Failed to get TX DMA channel\n");
dma_release_channel(sdd->rx_dma.ch);
- sdd->tx_dma.ch = 0;
- sdd->rx_dma.ch = 0;
+ sdd->tx_dma.ch = NULL;
+ sdd->rx_dma.ch = NULL;
return 0;
}
@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
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 status;