Skip to content

Commit

Permalink
spi: s3c64xx: set pointers to null using NULL rather than 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Mark Brown committed Jun 13, 2022
1 parent 116679a commit 845d3fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,16 @@ 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;
}

sdd->tx_dma.ch = dma_request_chan(&sdd->pdev->dev, "tx");
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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 845d3fd

Please sign in to comment.