eal: return errors on device event callback unregister
authorYunjian Wang <wangyunjian@huawei.com>
Wed, 21 Oct 2020 11:19:23 +0000 (19:19 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 23 Oct 2020 11:35:50 +0000 (13:35 +0200)
commit3f01891391a1f9320549598a5ffef29415a4a3d7
tree5ba05a02a25b96d03b67305b8310530f3be5b114
parentc78bd27d4b74a74261b180cb8d5421b919c1ab9a
eal: return errors on device event callback unregister

Fix return value, using -EAGAIN instead of 0 when the callback is busy
and using -ENOENT instead of 0 when the callback is not found.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
lib/librte_eal/common/eal_common_dev.c