Commit 342fcde9 authored by Yang Yingliang's avatar Yang Yingliang Committed by Kalle Valo

wifi: ath11k: fix return value check in ath11k_ahb_probe()

ioremap() returns NULL pointer not PTR_ERR() when it fails,
so replace the IS_ERR() check with NULL pointer check.

Fixes: b42b3678 ("wifi: ath11k: remap ce register space for IPQ5018")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230217030031.4021289-1-yangyingliang@huawei.com
parent 8c464d16
...@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev) ...@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
* to a new space for accessing them. * to a new space for accessing them.
*/ */
ab->mem_ce = ioremap(ce_remap->base, ce_remap->size); ab->mem_ce = ioremap(ce_remap->base, ce_remap->size);
if (IS_ERR(ab->mem_ce)) { if (!ab->mem_ce) {
dev_err(&pdev->dev, "ce ioremap error\n"); dev_err(&pdev->dev, "ce ioremap error\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_core_free; goto err_core_free;
......
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