eal: fix interrupt trace point
authorYunjian Wang <wangyunjian@huawei.com>
Thu, 15 Oct 2020 08:42:30 +0000 (16:42 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 29 Oct 2020 15:30:49 +0000 (16:30 +0100)
commit39e2961a0938fe80c943e6188765f3792dce9dfb
tree069071083565dbd8b441bfa5e3d1e78a8d98f1d5
parentf72299fd157deee129c5d8415f9a58b1af0bf84c
eal: fix interrupt trace point

This patch fixes (dereference after null check) coverity issue.
For this reason, we should add null check at the beginning of the
function and return error directly if the 'intr_handle' is null.

Coverity issue: 357695, 357751
Fixes: 05c4105738d8 ("trace: add interrupt tracepoints")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
lib/librte_eal/freebsd/eal_interrupts.c
lib/librte_eal/linux/eal_interrupts.c