HomeFreeBSD

Fix a few bugs when gpiobus is detaching:

Description

Fix a few bugs when gpiobus is detaching:

  • Detach the gpiobus and the gpioc devices from the GPIO controller.
  • Fix the leak of gpiobus IRQ rman(9) region descriptor.
  • Fix the leak of child ivars and IRQ resource list.

While here return NULL (instead of 0) for a device_t that fails to allocate
the ivar memory.

Tested with gpiobus built as a module.

Sponsored by: Rubicon Communications (Netgate)

Details

Provenance
loosAuthored on
Parents
rS286844: Don't forget to invoke pre_execve() and post_execve().
Branches
Unknown
Tags
Unknown