drivers: usb_c: rt1715: fix uncheck return value cid issue

fix `gpio_add_callback` unchecked return value issue

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
Jilay Pandya 2025-03-01 13:41:08 +01:00 committed by Alberto Escolar
commit 07fc70a697

View file

@ -618,7 +618,14 @@ void rt1715_init_work_cb(struct k_work *work)
gpio_pin_configure_dt(&cfg->alert_gpio, GPIO_INPUT);
gpio_init_callback(&data->alert_cb, rt1715_alert_cb, BIT(cfg->alert_gpio.pin));
gpio_add_callback(cfg->alert_gpio.port, &data->alert_cb);
ret = gpio_add_callback(cfg->alert_gpio.port, &data->alert_cb);
if (ret != 0) {
LOG_ERR("Failed to add alert callback: %d", ret);
return;
}
gpio_pin_interrupt_configure_dt(&cfg->alert_gpio, GPIO_INT_EDGE_TO_ACTIVE);
tcpci_init_alert_mask(data->dev);