From f282af588aca417804d2c29cbfc2a2736cd00616 Mon Sep 17 00:00:00 2001 From: Tomasz Duszynski Date: Mon, 16 Aug 2021 01:12:00 +0200 Subject: [PATCH] raw/cnxk_bphy: fix device lookup Name needs to be prepared before the lookup otherwise PMD will not be released. Fixes: 24d9c5d59d5d ("raw/cnxk_bphy: add baseband PHY skeleton driver") Cc: stable@dpdk.org Signed-off-by: Tomasz Duszynski Reviewed-by: Jerin Jacob --- drivers/raw/cnxk_bphy/cnxk_bphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index 030beff05e..69fd040ec3 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -307,14 +307,13 @@ bphy_rawdev_remove(struct rte_pci_device *pci_dev) return -EINVAL; } + bphy_rawdev_get_name(name, pci_dev); rawdev = rte_rawdev_pmd_get_named_dev(name); if (rawdev == NULL) { plt_err("invalid device name (%s)", name); return -EINVAL; } - bphy_rawdev_get_name(name, pci_dev); - return rte_rawdev_pmd_release(rawdev); } -- 2.20.1