summaryrefslogtreecommitdiff
path: root/drivers/raw
diff options
context:
space:
mode:
authorRosen Xu <rosen.xu@intel.com>2018-10-23 09:50:49 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commitb6aadd7436bfc1fb2af67aa266588fdd80ca8988 (patch)
treed54df641b2b39c24c585fda8b5c057bf9ffae77e /drivers/raw
parent3a8207423a0ff20eebf5e841d0f2d803bd69414b (diff)
downloaddpdk-next-eventdev-b6aadd7436bfc1fb2af67aa266588fdd80ca8988.zip
dpdk-next-eventdev-b6aadd7436bfc1fb2af67aa266588fdd80ca8988.tar.gz
dpdk-next-eventdev-b6aadd7436bfc1fb2af67aa266588fdd80ca8988.tar.xz
raw/ifpga: check probing error
Fixes not checking rte_eal_hotplug_add() return value issue. Coverity issue: 323508 Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Diffstat (limited to 'drivers/raw')
-rw-r--r--drivers/raw/ifpga_rawdev/ifpga_rawdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
index 3fed057..32e318f 100644
--- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
+++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
@@ -542,6 +542,7 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
int port;
char *name = NULL;
char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
+ int ret = -1;
devargs = dev->device.devargs;
@@ -583,7 +584,7 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s",
port, name);
- rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME),
+ ret = rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME),
dev_name, devargs->args);
end:
if (kvlist)
@@ -591,7 +592,7 @@ end:
if (name)
free(name);
- return 0;
+ return ret;
}
static int