[PATCH] usb: dwc3: Check that the request is valid in dwc3_gadget_giveback()

Marek Vasut marex at denx.de
Fri Feb 14 19:33:05 CET 2020


On 2/14/20 1:23 PM, Vignesh Raghavendra wrote:
> From: Jean-Jacques Hiblot <jjhiblot at ti.com>
> 
> This fixes potential issues reported by klokworks:
> Pointer 'req' returned from call to function 'next_request' at line 531 and
> 538 may be NULL and will be dereferenced in dwc3_gadget_giveback()

Shouldn't you rather handle the issue in dwc3_remove_requests() ?
Also, please explain what conditions trigger this issue, i.e. when req
becomes NULL.


More information about the U-Boot mailing list