Commit f0df2e65 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown

ASoC: amd: acp3x: Fix return value check in acp3x_dai_probe()

In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: c9fe7db6 ("ASoC: amd: Refactoring of DAI from DMA driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200108035954.51317-1-weiyongjun1@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 599b1019
...@@ -321,8 +321,8 @@ static int acp3x_dai_probe(struct platform_device *pdev) ...@@ -321,8 +321,8 @@ static int acp3x_dai_probe(struct platform_device *pdev)
} }
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res)); resource_size(res));
if (IS_ERR(adata->acp3x_base)) if (!adata->acp3x_base)
return PTR_ERR(adata->acp3x_base); return -ENOMEM;
adata->i2s_irq = res->start; adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata); dev_set_drvdata(&pdev->dev, adata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment