drivers: display: ssd1306: add missing error handling
gpio_pin_configure_dt call was not being checker for errors. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
d65b7191d5
commit
f667b09ade
1 changed files with 7 additions and 1 deletions
|
@ -408,7 +408,13 @@ static int ssd1306_init(const struct device *dev)
|
|||
}
|
||||
|
||||
if (config->reset.port) {
|
||||
gpio_pin_configure_dt(&config->reset, GPIO_OUTPUT_INACTIVE);
|
||||
int ret;
|
||||
|
||||
ret = gpio_pin_configure_dt(&config->reset,
|
||||
GPIO_OUTPUT_INACTIVE);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (ssd1306_init_device(dev)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue