This function is documented to return the number of unregistered
callbacks or negative numbers on error, but pci_vfio checks for
ret != 0 to detect failures. Not anymore.
Fixes:
c115fd000c32 ("vfio: handle hotplug request notifier")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
pci_vfio_req_handler,
(void *)&dev->device);
- if (ret)
+ if (ret < 0)
RTE_LOG(ERR, EAL,
"Fail to unregister req notifier handler.\n");
goto error;
ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
pci_vfio_req_handler,
(void *)&dev->device);
- if (ret) {
+ if (ret < 0) {
RTE_LOG(ERR, EAL,
"fail to unregister req notifier handler.\n");
return -1;