From patchwork Sun Sep 3 12:32:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongliang Mu X-Patchwork-Id: 719958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9512EC71153 for ; Sun, 3 Sep 2023 12:33:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237103AbjICMdi (ORCPT ); Sun, 3 Sep 2023 08:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjICMdh (ORCPT ); Sun, 3 Sep 2023 08:33:37 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C220D126; Sun, 3 Sep 2023 05:33:33 -0700 (PDT) Received: from localhost.localdomain ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 383CWVTj004330-383CWVTk004330 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 3 Sep 2023 20:32:36 +0800 From: Dongliang Mu To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo Cc: hust-os-kernel-patches@googlegroups.com, Dongliang Mu , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ath9k: unify error handling code in ath9k_hif_usb_resume Date: Sun, 3 Sep 2023 20:32:29 +0800 Message-Id: <20230903123230.2116129-1-dzm91@hust.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-FEAS-AUTH-USER: dzm91@hust.edu.cn Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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);