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:
parent
737133a6df
commit
07fc70a697
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue