Skip to content

drivers/usbdev: Fix DEBUGASSERT on usbmsc_unbind() function#18361

Open
arikimari wants to merge 1 commit intoapache:masterfrom
tiiuae:fix_usbmsc_unbind
Open

drivers/usbdev: Fix DEBUGASSERT on usbmsc_unbind() function#18361
arikimari wants to merge 1 commit intoapache:masterfrom
tiiuae:fix_usbmsc_unbind

Conversation

@arikimari
Copy link
Contributor

Fix DEBUGASSERT on usbmsc_unbind() function

Summary

  1. Move DEBUGASSERT to correct place (inside priv != NULL)
  2. Leave it out if composite device
  3. Update assert comment

Impact

Devices using usb msc as composite device and have
CONFIG_DEBUG_ASSERTIONS enabled

Testing

Tested with custom npx93 HW

Function call chain without this fix:

composite_uninitialize()
composite_unbind()
usbmsc_unbind()
Current Version: NuttX 12.11.0 6975be4-dirty Feb 6 2026 13:53:32 arm64
Assertion failed : at file: :0 task: bootloader_main process: bootloader_main 0x80010714

Function call chain with this fix:

composite_uninitialize()
composite_unbind()
usbmsc_unbind()
usbmsc_uninitialize()

@github-actions github-actions bot added Area: USB Size: S The size of the change in this PR is small labels Feb 6, 2026
1. Move DEBUGASSERT to correct place
2. Leave it out if composite device

Signed-off-by: Ari Kimari <ari.kimari@tii.ae>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: USB Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants