diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-09-16 09:05:35 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-09-28 05:41:04 -0400 |
commit | 931eb6b7fee31f63d33fd5e1e62a60375fa6fb32 (patch) | |
tree | 3e9612db2b7571efae75a3e27a04aeaf72e00acb | |
parent | 30d2049b3277cdf6964996f86626add08cf160df (diff) |
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: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ahb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index fe38b459544d..766c63bf05c4 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c | |||
@@ -509,6 +509,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar) | |||
509 | ar_ahb->irq = platform_get_irq_byname(pdev, "legacy"); | 509 | ar_ahb->irq = platform_get_irq_byname(pdev, "legacy"); |
510 | if (ar_ahb->irq < 0) { | 510 | if (ar_ahb->irq < 0) { |
511 | ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq); | 511 | ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq); |
512 | ret = ar_ahb->irq; | ||
512 | goto err_clock_deinit; | 513 | goto err_clock_deinit; |
513 | } | 514 | } |
514 | 515 | ||
@@ -787,6 +788,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev) | |||
787 | chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS); | 788 | chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS); |
788 | if (chip_id == 0xffffffff) { | 789 | if (chip_id == 0xffffffff) { |
789 | ath10k_err(ar, "failed to get chip id\n"); | 790 | ath10k_err(ar, "failed to get chip id\n"); |
791 | ret = -ENODEV; | ||
790 | goto err_halt_device; | 792 | goto err_halt_device; |
791 | } | 793 | } |
792 | 794 | ||