[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230903123230.2116129-1-dzm91@hust.edu.cn>
Date: Sun, 3 Sep 2023 20:32:29 +0800
From: Dongliang Mu <dzm91@...t.edu.cn>
To: Toke Høiland-Jørgensen <toke@...e.dk>,
Kalle Valo <kvalo@...nel.org>
Cc: hust-os-kernel-patches@...glegroups.com,
Dongliang Mu <dzm91@...t.edu.cn>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
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 <dzm91@...t.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
Powered by blists - more mailing lists