mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Release all previously allocated resources.
This commit is contained in:
parent
1a3c849840
commit
112d8ca98c
1 changed files with 7 additions and 2 deletions
|
|
@ -220,9 +220,14 @@ sdhci_fdt_gpio_teardown(struct sdhci_fdt_gpio *gpio)
|
|||
if (gpio == NULL)
|
||||
return;
|
||||
|
||||
if (gpio->cd_ihandler != NULL) {
|
||||
if (gpio->cd_ihandler != NULL)
|
||||
bus_teardown_intr(gpio->dev, gpio->cd_ires, gpio->cd_ihandler);
|
||||
}
|
||||
if (gpio->wp_pin != NULL)
|
||||
gpio_pin_release(gpio->wp_pin);
|
||||
if (gpio->cd_pin != NULL)
|
||||
gpio_pin_release(gpio->cd_pin);
|
||||
if (gpio->cd_ires != NULL)
|
||||
bus_release_resource(gpio->dev, SYS_RES_IRQ, 0, gpio->cd_ires);
|
||||
|
||||
free(gpio, M_DEVBUF);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue