Commit 931eb6b7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Kalle Valo

ath10k: fix error return code in ahb

Fix to return a negative error code from the error handling case
instead of 0, as done elsewhere in function ath10k_ahb_probe() or
ath10k_ahb_resource_init().
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 30d2049b
...@@ -509,6 +509,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar) ...@@ -509,6 +509,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)
ar_ahb->irq = platform_get_irq_byname(pdev, "legacy"); ar_ahb->irq = platform_get_irq_byname(pdev, "legacy");
if (ar_ahb->irq < 0) { if (ar_ahb->irq < 0) {
ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq); ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq);
ret = ar_ahb->irq;
goto err_clock_deinit; goto err_clock_deinit;
} }
...@@ -787,6 +788,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev) ...@@ -787,6 +788,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS); chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
if (chip_id == 0xffffffff) { if (chip_id == 0xffffffff) {
ath10k_err(ar, "failed to get chip id\n"); ath10k_err(ar, "failed to get chip id\n");
ret = -ENODEV;
goto err_halt_device; goto err_halt_device;
} }
......
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