2023-09-04 13:59:17

by Dongliang Mu

[permalink] [raw]
Subject: [PATCH] ath9k: unify error handling code in ath9k_hif_usb_resume

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 <[email protected]>
---
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