[PATCH v2 1/2] usb: ci_udc: Check ci_ep->desc before use

Mattijs Korpershoek mkorpershoek at kernel.org
Tue Jan 6 14:20:28 CET 2026


Hi Petr,

Thank you for the patch.

On Thu, Dec 18, 2025 at 15:27, Petr Beneš <petr.benes at ysoft.com> wrote:

> There are two places where ci_ep->desc could be accessed despite it is
> not valid at that moment. Either the endpoint has not been enabled yet
> or it has been disabled meanwhile (The ethernet gadged behaves this way
> at least.). That results in dereferencing a null pointer.
>
> Moreover, the patch gets rid of possible outstanding requests if the
> endpoint's state changes to disabled.
>
> Signed-off-by: Petr Beneš <petr.benes at ysoft.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek at kernel.org>

> ---
>
> v2: return values aligned with Linux as requested by Mattijs
>


More information about the U-Boot mailing list