From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: ath9k-devel@qca.qualcomm.com, kvalo@codeaurora.org, davem@davemloft.net
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Jia-Ju Bai <baijiaju1990@gmail.com>
Subject: [PATCH] net: wireless: ath9k: Return an error when ath9k_hw_reset() fails
Date: Sat, 4 May 2019 18:08:15 +0800 [thread overview]
Message-ID: <20190504100815.19876-1-baijiaju1990@gmail.com> (raw)
ath9k_hw_reset() in ath9k_start() can fail, and in this case,
ath9k_start() should return an error instead of executing the
subsequent code.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
drivers/net/wireless/ath/ath9k/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f23cb2f3d296..f78e7c46764d 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -681,6 +681,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
"Unable to reset hardware; reset status %d (freq %u MHz)\n",
r, curchan->center_freq);
ah->reset_power_on = false;
+ return r;
}
/* Setup our intr mask. */
--
2.17.0
next reply other threads:[~2019-05-04 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 10:08 Jia-Ju Bai [this message]
2019-05-04 11:02 ` Heiner Kallweit
2019-05-06 8:24 ` 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=20190504100815.19876-1-baijiaju1990@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=ath9k-devel@qca.qualcomm.com \
--cc=davem@davemloft.net \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®