Skip to content

Commit 190bb01

Browse files
xdarklightfelipebalbi
authored andcommitted
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: e1c08cf ("usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails") Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
1 parent fa27e2f commit 190bb01

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/usb/dwc2/platform.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,13 @@ static int dwc2_driver_probe(struct platform_device *dev)
608608
#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
609609
return 0;
610610

611+
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
612+
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
611613
error_debugfs:
612614
dwc2_debugfs_exit(hsotg);
613615
if (hsotg->hcd_enabled)
614616
dwc2_hcd_remove(hsotg);
617+
#endif
615618
error_drd:
616619
dwc2_drd_exit(hsotg);
617620

0 commit comments

Comments
 (0)