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

ASoC: mmp-sspa: Fix return value check in asoc_mmp_sspa_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.
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200527030210.124393-1-weiyongjun1@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 850ba84b
......@@ -493,13 +493,13 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
return -ENODEV;
sspa->rx_base = devm_ioremap(&pdev->dev, res->start, 0x30);
if (IS_ERR(sspa->rx_base))
return PTR_ERR(sspa->rx_base);
if (!sspa->rx_base)
return -ENOMEM;
sspa->tx_base = devm_ioremap(&pdev->dev,
res->start + 0x80, 0x30);
if (IS_ERR(sspa->tx_base))
return PTR_ERR(sspa->tx_base);
if (!sspa->tx_base)
return -ENOMEM;
sspa->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sspa->clk))
......
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