Skip to content

Commit

Permalink
mtd: rawnand: qcom: Use dma_mapping_error() for error check
Browse files Browse the repository at this point in the history
dma_mapping_error() should be used for checking the error value of
dma_map_resource() API.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210405050912.115591-1-manivannan.sadhasivam@linaro.org
  • Loading branch information
Manivannan Sadhasivam authored and Miquel Raynal committed Apr 7, 2021
1 parent 076de75 commit 32cbc7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/qcom_nandc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,7 @@ static int qcom_nandc_probe(struct platform_device *pdev)
nandc->base_dma = dma_map_resource(dev, res->start,
resource_size(res),
DMA_BIDIRECTIONAL, 0);
if (!nandc->base_dma)
if (dma_mapping_error(dev, nandc->base_dma))
return -ENXIO;

ret = qcom_nandc_alloc(nandc);
Expand Down

0 comments on commit 32cbc7c

Please sign in to comment.