From 07b4a8be61e9f0e2af2d15685ddf2f9eb5ba162e Mon Sep 17 00:00:00 2001 From: Rosen Xu Date: Tue, 22 May 2018 18:26:16 +0800 Subject: [PATCH] bus/ifpga: fix error check in unplug The control variable should be afu_dev not dev. Coverity issue: 279455 Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Cc: stable@dpdk.org Signed-off-by: Rosen Xu --- drivers/bus/ifpga/ifpga_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index 45597a1bbd..675b9a3bc9 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -367,7 +367,7 @@ ifpga_unplug(struct rte_device *dev) return -EINVAL; afu_dev = RTE_DEV_TO_AFU(dev); - if (!dev) + if (!afu_dev) return -ENOENT; devargs = dev->devargs; -- 2.20.1