eal: report duplicate device event callback
authorYunjian Wang <wangyunjian@huawei.com>
Wed, 21 Oct 2020 11:19:49 +0000 (19:19 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 23 Oct 2020 11:35:56 +0000 (13:35 +0200)
commit1cdb89c177269a0756f82ae3eb057fe34e205f41
tree944c0a441c259405ddc1d7a6bb75db743d89ba5f
parent3f01891391a1f9320549598a5ffef29415a4a3d7
eal: report duplicate device event callback

We should return an error value, when the callback is already exist.

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

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