git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: make tunnel hub list thread safe
[dpdk.git]
/
lib
/
librte_eal
/
linux
/
eal_interrupts.c
diff --git
a/lib/librte_eal/linux/eal_interrupts.c
b/lib/librte_eal/linux/eal_interrupts.c
index
26b5dd4
..
2f03a61
100644
(file)
--- a/
lib/librte_eal/linux/eal_interrupts.c
+++ b/
lib/librte_eal/linux/eal_interrupts.c
@@
-667,13
+667,15
@@
rte_intr_enable(const struct rte_intr_handle *intr_handle)
{
int rc = 0;
{
int rc = 0;
- if (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {
+ if (intr_handle == NULL)
+ return -1;
+
+ if (intr_handle->type == RTE_INTR_HANDLE_VDEV) {
rc = 0;
goto out;
}
rc = 0;
goto out;
}
- if (!intr_handle || intr_handle->fd < 0 ||
- intr_handle->uio_cfg_fd < 0) {
+ if (intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0) {
rc = -1;
goto out;
}
rc = -1;
goto out;
}
@@
-794,13
+796,15
@@
rte_intr_disable(const struct rte_intr_handle *intr_handle)
{
int rc = 0;
{
int rc = 0;
- if (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {
+ if (intr_handle == NULL)
+ return -1;
+
+ if (intr_handle->type == RTE_INTR_HANDLE_VDEV) {
rc = 0;
goto out;
}
rc = 0;
goto out;
}
- if (!intr_handle || intr_handle->fd < 0 ||
- intr_handle->uio_cfg_fd < 0) {
+ if (intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0) {
rc = -1;
goto out;
}
rc = -1;
goto out;
}