Skip to content

Commit 845d3fd

Browse files
ColinIanKingbroonie
authored andcommitted
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>
1 parent 116679a commit 845d3fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/spi/spi-s3c64xx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,16 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
354354
sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
355355
if (IS_ERR(sdd->rx_dma.ch)) {
356356
dev_err(&sdd->pdev->dev, "Failed to get RX DMA channel\n");
357-
sdd->rx_dma.ch = 0;
357+
sdd->rx_dma.ch = NULL;
358358
return 0;
359359
}
360360

361361
sdd->tx_dma.ch = dma_request_chan(&sdd->pdev->dev, "tx");
362362
if (IS_ERR(sdd->tx_dma.ch)) {
363363
dev_err(&sdd->pdev->dev, "Failed to get TX DMA channel\n");
364364
dma_release_channel(sdd->rx_dma.ch);
365-
sdd->tx_dma.ch = 0;
366-
sdd->rx_dma.ch = 0;
365+
sdd->tx_dma.ch = NULL;
366+
sdd->rx_dma.ch = NULL;
367367
return 0;
368368
}
369369

@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
808808
if (sdd->rx_dma.ch && sdd->tx_dma.ch) {
809809
dma_release_channel(sdd->rx_dma.ch);
810810
dma_release_channel(sdd->tx_dma.ch);
811-
sdd->rx_dma.ch = 0;
812-
sdd->tx_dma.ch = 0;
811+
sdd->rx_dma.ch = NULL;
812+
sdd->tx_dma.ch = NULL;
813813
}
814814

815815
return status;

0 commit comments

Comments
 (0)