dev_delayed_unregister(void *param)
{
rte_intr_callback_unregister(intr_handle, dev_uev_handler, param);
- close(rte_intr_fd_get(intr_handle));
- rte_intr_fd_set(intr_handle, -1);
+ if (rte_intr_fd_get(intr_handle) >= 0) {
+ close(rte_intr_fd_get(intr_handle));
+ rte_intr_fd_set(intr_handle, -1);
+ }
}
static void
memset(&uevent, 0, sizeof(struct rte_dev_event));
memset(buf, 0, EAL_UEV_MSG_LEN);
+ if (rte_intr_fd_get(intr_handle) < 0)
+ return;
+
ret = recv(rte_intr_fd_get(intr_handle), buf, EAL_UEV_MSG_LEN,
MSG_DONTWAIT);
if (ret < 0 && errno == EAGAIN)