From: Kalle Valo <kvalo@kernel.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 3/3] ath11k: mhi: remove unnecessary goto from ath11k_mhi_start()
Date: Fri, 1 Apr 2022 20:30:42 +0300 [thread overview]
Message-ID: <20220401173042.17467-4-kvalo@kernel.org> (raw)
In-Reply-To: <20220401173042.17467-1-kvalo@kernel.org>
From: Kalle Valo <quic_kvalo@quicinc.com>
No need to have goto for a return statement, so simplify the code. While at it,
print warning messages if power up calls fail.
No functional changes.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
---
drivers/net/wireless/ath/ath11k/mhi.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
index 706de7b0b4a1..a372ebb184a1 100644
--- a/drivers/net/wireless/ath/ath11k/mhi.c
+++ b/drivers/net/wireless/ath/ath11k/mhi.c
@@ -463,22 +463,24 @@ void ath11k_mhi_unregister(struct ath11k_pci *ab_pci)
int ath11k_mhi_start(struct ath11k_pci *ab_pci)
{
+ struct ath11k_base *ab = ab_pci->ab;
int ret;
ab_pci->mhi_ctrl->timeout_ms = MHI_TIMEOUT_DEFAULT_MS;
ret = mhi_prepare_for_power_up(ab_pci->mhi_ctrl);
- if (ret)
- goto out;
+ if (ret) {
+ ath11k_warn(ab, "failed to prepare mhi: %d", ret);
+ return ret;
+ }
ret = mhi_sync_power_up(ab_pci->mhi_ctrl);
- if (ret)
- goto out;
+ if (ret) {
+ ath11k_warn(ab, "failed to power up mhi: %d", ret);
+ return ret;
+ }
return 0;
-
-out:
- return ret;
}
void ath11k_mhi_stop(struct ath11k_pci *ab_pci)
--
2.30.2
next prev parent reply other threads:[~2022-04-01 17:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 17:30 [PATCH 0/3] ath11k: mhi cleanup Kalle Valo
2022-04-01 17:30 ` [PATCH 1/3] ath11k: mhi: remove state machine Kalle Valo
2022-04-06 7:53 ` Kalle Valo
2022-04-06 8:34 ` Kalle Valo
2022-04-01 17:30 ` [PATCH 2/3] ath11k: mhi: add error handling for suspend and resume Kalle Valo
2022-04-01 17:30 ` Kalle Valo [this message]
2022-04-01 18:22 ` [PATCH 0/3] ath11k: mhi cleanup Jeff Johnson
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=20220401173042.17467-4-kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).