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:
Gerard Marull-Paretas 2021-09-01 09:53:06 +02:00 committed by Christopher Friedt
commit f667b09ade

View file

@ -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)) {