dp: swdp_bitbang: fix missing reset pin error

This patch fixes an issue where the reset pin is used even when it's
not given.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
This commit is contained in:
Maximilian Deubel 2024-11-05 14:58:13 +01:00 committed by Mahesh Mahadevan
parent 4331b5fe77
commit 4f85ce6eda

View file

@ -601,10 +601,12 @@ static int sw_port_on(const struct device *dev)
return ret;
}
if (config->reset.port) {
ret = gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_ACTIVE);
if (ret) {
return ret;
}
}
return 0;
}