The return value of pci_plug in pci_common.c
will always be int vaule, can not be NULL.
We could use not 0 to check it.

Author: Tao YunXiang <taoyunxi...@cmss.chinamobile.com>
Signed-off-by: Tao YunXiang <taoyunxi...@cmss.chinamobile.com>

---
 lib/eal/common/eal_common_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 148a23830a..99677bae58 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -143,7 +143,7 @@ local_dev_probe(const char *devargs, struct rte_device 
**new_dev)
        if (ret)
                goto err_devarg;
 
-       if (da->bus->plug == NULL) {
+       if (da->bus->plug != 0) {
                RTE_LOG(ERR, EAL, "Function plug not supported by bus (%s)\n",
                        da->bus->name);
                ret = -ENOTSUP;
-- 
2.12.2



Reply via email to