gpio_smartbond: Remove pdc entry only if it exists

Remove pdc entry only if index exists when CONFIG_PM
is set.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
This commit is contained in:
Ioannis Damigos 2024-07-29 16:33:11 +03:00 committed by Anas Nashif
parent df86860319
commit 82d17f1f2c
1 changed files with 3 additions and 1 deletions

View File

@ -242,7 +242,9 @@ static int gpio_smartbond_pin_interrupt_configure(const struct device *dev,
config->wkup_regs->clear = pin_mask;
data->both_edges_pins &= ~pin_mask;
#if CONFIG_PM
da1469x_pdc_del(pdc_ix);
if (pdc_ix >= 0) {
da1469x_pdc_del(pdc_ix);
}
#endif
} else {
if (trig == GPIO_INT_TRIG_BOTH) {