diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2021-04-05 08:09:12 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-04-07 11:07:46 +0300 |
commit | 32cbc7cb70b07041e82f897f96b3035358470b14 (patch) | |
tree | 2f57e4a8329af60e971c5247c20efdb25ae593f7 /drivers/mtd/nand/raw | |
parent | 076de75de1e53160e9b099f75872c1f9adf41a0b (diff) | |
download | linux-32cbc7cb70b07041e82f897f96b3035358470b14.tar.xz |
mtd: rawnand: qcom: Use dma_mapping_error() for error check
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
Diffstat (limited to 'drivers/mtd/nand/raw')
-rw-r--r-- | drivers/mtd/nand/raw/qcom_nandc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 1fc5ec1482cb..a64fb6ce915d 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -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); |