未验证 提交 7c88b928 编写于 作者: W Wei Yongjun 提交者: Mark Brown

ASoC: sprd: Fix return value check in sprd_mcdt_probe()

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

Fixes: d7bff893 ("ASoC: sprd: Add Spreadtrum multi-channel data transfer support")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 62be484f
......@@ -951,8 +951,8 @@ static int sprd_mcdt_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mcdt->base = devm_ioremap_resource(&pdev->dev, res);
if (!mcdt->base)
return -ENOMEM;
if (IS_ERR(mcdt->base))
return PTR_ERR(mcdt->base);
mcdt->dev = &pdev->dev;
spin_lock_init(&mcdt->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册