diff mbox series

[1/3] raw/cnxk_bphy: fix device lookup

Message ID 20210815231202.1192974-2-tduszynski@marvell.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers show
Series support reading NPA/SSO PF function | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tomasz Duszynski Aug. 15, 2021, 11:12 p.m. UTC
Name needs to be prepared before the lookup otherwise
PMD will not be released.

Fixes: 24d9c5d59d5d ("raw/cnxk_bphy: add baseband PHY skeleton driver")

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/raw/cnxk_bphy/cnxk_bphy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jerin Jacob Sept. 28, 2021, 1:20 p.m. UTC | #1
On Mon, Aug 16, 2021 at 4:43 AM Tomasz Duszynski <tduszynski@marvell.com> wrote:
>
> Name needs to be prepared before the lookup otherwise
> PMD will not be released.
>
> Fixes: 24d9c5d59d5d ("raw/cnxk_bphy: add baseband PHY skeleton driver")
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>


Series applied to dpdk-next-net-mrvl/for-next-net. Thanks.


> ---
>  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 9cb3f8d332..8a0d2224c0 100644
> --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
> +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
> @@ -306,14 +306,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.25.1
>
diff mbox series

Patch

diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index 9cb3f8d332..8a0d2224c0 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -306,14 +306,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);
 }