From: Martin Blumenstingl Date: Sat, 17 Oct 2020 16:50:12 +0000 (+0200) Subject: usb: dwc2: Avoid leaving the error_debugfs label unused X-Git-Tag: v5.10.7~1203^2~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=190bb01b72d2d5c3654a03c42fb1ad0dc6114c79;p=platform%2Fkernel%2Flinux-rpi.git usb: dwc2: Avoid leaving the error_debugfs label unused 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 --- diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index e282067..5f18acac 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -608,10 +608,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_drd: dwc2_drd_exit(hsotg);