Skip to content

Commit

Permalink
ASoC: amd: acp3x: Fix return value check in acp3x_dai_probe()
Browse files Browse the repository at this point in the history
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: c9fe7db ("ASoC: amd: Refactoring of DAI from DMA driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200108035954.51317-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Wei Yongjun authored and Mark Brown committed Jan 9, 2020
1 parent 599b101 commit f0df2e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/amd/raven/acp3x-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ static int acp3x_dai_probe(struct platform_device *pdev)
}
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (IS_ERR(adata->acp3x_base))
return PTR_ERR(adata->acp3x_base);
if (!adata->acp3x_base)
return -ENOMEM;

adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
Expand Down

0 comments on commit f0df2e6

Please sign in to comment.