All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>, Raja Mani <rmani@qti.qualcomm.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
	ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: [PATCH -next] ath10k: fix error return code in ahb
Date: Fri, 16 Sep 2016 13:05:35 +0000	[thread overview]
Message-ID: <1474031135-6963-1-git-send-email-weiyj.lk@gmail.com> (raw)

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/net/wireless/ath/ath10k/ahb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index b99ad5d..6dc1c60 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -572,6 +572,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)
 	ar_ahb->irq = platform_get_irq_byname(pdev, "legacy");
 	if (ar_ahb->irq < 0) {
 		ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq);
+		ret = ar_ahb->irq;
 		goto err_clock_deinit;
 	}
 
@@ -850,6 +851,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
 	chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
 	if (chip_id == 0xffffffff) {
 		ath10k_err(ar, "failed to get chip id\n");
+		ret = -ENODEV;
 		goto err_halt_device;
 	}

WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyj.lk@gmail.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>, Raja Mani <rmani@qti.qualcomm.com>
Cc: linux-wireless@vger.kernel.org,
	Wei Yongjun <weiyongjun1@huawei.com>,
	ath10k@lists.infradead.org
Subject: [PATCH -next] ath10k: fix error return code in ahb
Date: Fri, 16 Sep 2016 13:05:35 +0000	[thread overview]
Message-ID: <1474031135-6963-1-git-send-email-weiyj.lk@gmail.com> (raw)

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/net/wireless/ath/ath10k/ahb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index b99ad5d..6dc1c60 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -572,6 +572,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)
 	ar_ahb->irq = platform_get_irq_byname(pdev, "legacy");
 	if (ar_ahb->irq < 0) {
 		ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq);
+		ret = ar_ahb->irq;
 		goto err_clock_deinit;
 	}
 
@@ -850,6 +851,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
 	chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
 	if (chip_id == 0xffffffff) {
 		ath10k_err(ar, "failed to get chip id\n");
+		ret = -ENODEV;
 		goto err_halt_device;
 	}


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

             reply	other threads:[~2016-09-16 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 13:05 Wei Yongjun [this message]
2016-09-16 13:05 ` [PATCH -next] ath10k: fix error return code in ahb Wei Yongjun
2016-09-28  9:44 ` [-next] " Kalle Valo
2016-09-28  9:44   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474031135-6963-1-git-send-email-weiyj.lk@gmail.com \
    --to=weiyj.lk@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rmani@qti.qualcomm.com \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.