Skip to content

Commit a01ab79

Browse files
jfischer-nonashif
authored andcommitted
drivers: udc_kinetis: add missing return statement
Add the missing return statement to the branch where no slabs are available. Signed-off-by: Johann Fischer <[email protected]>
1 parent 1c0f241 commit a01ab79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/udc/udc_kinetis.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ static void usbfsotg_event_submit(const struct device *dev,
448448
ret = k_mem_slab_alloc(&usbfsotg_ee_slab, (void **)&ev, K_NO_WAIT);
449449
if (ret) {
450450
udc_submit_event(dev, UDC_EVT_ERROR, ret);
451+
LOG_ERR("Failed to allocate slab");
452+
return;
451453
}
452454

453455
ev->dev = dev;

0 commit comments

Comments
 (0)