espi: Fix gpio_manage_callback() logic
espi_manage_callback() returns -EINVAL if it could not remove callback. However if the list is empty success is returned when trying to remove callback. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
005a4d8a31
commit
a657abae23
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,8 @@ static inline int espi_manage_callback(sys_slist_t *callbacks,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (!set) {
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set) {
|
if (set) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue