提交 190bb01b 编写于 作者: M Martin Blumenstingl 提交者: Felipe Balbi

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: e1c08cf2 ("usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails")
Acked-by: NMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
上级 fa27e2f6
...@@ -608,10 +608,13 @@ static int dwc2_driver_probe(struct platform_device *dev) ...@@ -608,10 +608,13 @@ static int dwc2_driver_probe(struct platform_device *dev)
#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ #endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
return 0; return 0;
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
error_debugfs: error_debugfs:
dwc2_debugfs_exit(hsotg); dwc2_debugfs_exit(hsotg);
if (hsotg->hcd_enabled) if (hsotg->hcd_enabled)
dwc2_hcd_remove(hsotg); dwc2_hcd_remove(hsotg);
#endif
error_drd: error_drd:
dwc2_drd_exit(hsotg); dwc2_drd_exit(hsotg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册