diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-02-17 06:00:31 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-02-20 11:36:28 +0300 |
commit | 342fcde9d91460f01f65707e16368a1571271a3a (patch) | |
tree | 3707257e681783f1bb40c12a11eab841a31aca64 /drivers/net/wireless/ath/ath11k | |
parent | 8c464d16809fa02982f6341ea598ec5d07457f19 (diff) | |
download | linux-342fcde9d91460f01f65707e16368a1571271a3a.tar.xz |
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: b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230217030031.4021289-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/ahb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index cd48eca494ed..022caacd2822 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev) * to a new space for accessing them. */ 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"); ret = -ENOMEM; goto err_core_free; |