From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E56D0C2D0E4 for ; Fri, 20 Nov 2020 16:46:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 823E52240B for ; Fri, 20 Nov 2020 16:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728104AbgKTQq4 (ORCPT ); Fri, 20 Nov 2020 11:46:56 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54446 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729306AbgKTQqz (ORCPT ); Fri, 20 Nov 2020 11:46:55 -0500 Received: from 3.general.kamal.us.vpn ([10.172.68.53] helo=ascalon) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kg9Yj-0007MA-J1; Fri, 20 Nov 2020 16:46:53 +0000 Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1kg9Yf-0003Jy-9C; Fri, 20 Nov 2020 08:46:49 -0800 From: Kamal Mostafa To: Greg KH Cc: Martin Blumenstingl , Sasha Levin , stable@vger.kernel.org, Felipe Balbi , Kamal Mostafa Subject: [PATCH 5.9.x] usb: dwc2: Avoid leaving the error_debugfs label unused Date: Fri, 20 Nov 2020 08:46:45 -0800 Message-Id: <20201120164645.12542-1-kamal@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Martin Blumenstingl commit 190bb01b72d2d5c3654a03c42fb1ad0dc6114c79 upstream. The error_debugfs label is only used when either CONFIG_USB_DWC2_PERIPHERAL or CONFIG_USB_DWC2_DUAL_ROLE is enabled. Add the same #if to the error_debugfs label itself as the code which uses this label already has. This avoids the following compiler warning: warning: label ‘error_debugfs’ defined but not used [-Wunused-label] Fixes: e1c08cf23172ed ("usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails") Acked-by: Minas Harutyunyan Reported-by: kernel test robot Reported-by: Jens Axboe Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi Cc: stable@vger.kernel.org # 5.9.x Signed-off-by: Kamal Mostafa --- drivers/usb/dwc2/platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index b28e90e0b685..8a7f86e1ef73 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -590,10 +590,13 @@ static int dwc2_driver_probe(struct platform_device *dev) #endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ return 0; +#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ + IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) error_debugfs: dwc2_debugfs_exit(hsotg); if (hsotg->hcd_enabled) dwc2_hcd_remove(hsotg); +#endif error_init: if (hsotg->params.activate_stm_id_vb_detection) regulator_disable(hsotg->usb33d); -- 2.17.1