From: Rosen Xu Date: Tue, 22 May 2018 10:26:16 +0000 (+0800) Subject: bus/ifpga: fix error check in unplug X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=07b4a8be61e9f0e2af2d15685ddf2f9eb5ba162e;p=dpdk.git 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 --- 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;