]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
USB: gadget: fsl-udc: drop misleading unbind sanity check
authorJohan Hovold <johan@kernel.org>
Thu, 2 Jul 2026 14:15:36 +0000 (16:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jul 2026 05:10:11 +0000 (07:10 +0200)
The UDC pointer is set on successful probe and will never be NULL when
the driver is later unbound so drop the misleading sanity check (and
confused error message).

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260702141536.90887-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/fsl_udc_core.c

index c4761933ec8600ff0df1bae8b5905d4cb16ea6a3..20392409afb1522bdf1fab7543b2f765ee09ed14 100644 (file)
@@ -2539,12 +2539,6 @@ static void fsl_udc_remove(struct platform_device *pdev)
 
        DECLARE_COMPLETION_ONSTACK(done);
 
-       if (!udc_controller) {
-               dev_err(&pdev->dev,
-                       "Driver still in use but removing anyhow\n");
-               return;
-       }
-
        udc_controller->done = &done;
        usb_del_gadget_udc(&udc_controller->gadget);