mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 20:26:13 +02:00
usb: gadget: atmel: Add missing null check
Add in the missing null check for udc->driver that is present at other points in the function before it is dereferenced. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Reviewed-by: Marek Vasut <marek.vasut@mailbox.org> Link: https://lore.kernel.org/r/20250929-atmel_usba_udc-v1-1-e1426271e12a@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
This commit is contained in:
parent
3ce8a0e911
commit
f586675872
@ -1147,7 +1147,7 @@ static int usba_udc_irq(struct usba_udc *udc)
|
||||
reset_all_endpoints(udc);
|
||||
|
||||
if (udc->gadget.speed != USB_SPEED_UNKNOWN &&
|
||||
udc->driver->disconnect) {
|
||||
udc->driver && udc->driver->disconnect) {
|
||||
udc->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
spin_unlock(&udc->lock);
|
||||
udc->driver->disconnect(&udc->gadget);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user