linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: unify error handling code in ath9k_hif_usb_resume
@ 2023-09-03 12:32 Dongliang Mu
  2023-09-04 10:06 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 3+ messages in thread
From: Dongliang Mu @ 2023-09-03 12:32 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Kalle Valo
  Cc: hust-os-kernel-patches, Dongliang Mu, linux-wireless,
	linux-kernel

In ath9k_hif_usb_resume, the error handling code calls
ath9k_hif_usb_dealloc_urbs twice in different paths.

To unify the error handling code, we replace one error handling path
with a goto statement.

Note that this patch does not incur any functionability change.

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
---
 drivers/net/wireless/ath/ath9k/hif_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index e5414435b141..dcc01274b008 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1502,8 +1502,8 @@ static int ath9k_hif_usb_resume(struct usb_interface *interface)
 		if (ret)
 			goto fail_resume;
 	} else {
-		ath9k_hif_usb_dealloc_urbs(hif_dev);
-		return -EIO;
+		ret = -EIO;
+		goto fail_resume;
 	}
 
 	mdelay(100);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-05 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 12:32 [PATCH] ath9k: unify error handling code in ath9k_hif_usb_resume Dongliang Mu
2023-09-04 10:06 ` Toke Høiland-Jørgensen
2023-09-05  1:36   ` Dongliang Mu

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).