diff mbox series

[SRU,F:linux-bluefield,1/1] pka: Fix NULL pointer kfree() issue

Message ID 20210610144851.5231-2-mahantesh@nvidia.com
State New
Headers show
Series [SRU,F:linux-bluefield,1/1] pka: Fix NULL pointer kfree() issue | expand

Commit Message

Mahantesh Salimath June 10, 2021, 2:48 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1931584

Signed-off-by: Mahantesh Salimath <mahantesh@nvidia.com>
Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
Signed-off-by: Mahantesh Salimath <mahantesh@nvidia.com>
---
diff mbox series

Patch

diff --git a/drivers/platform/mellanox/mlxbf_pka/mlxbf_pka_dev.c b/drivers/platform/mellanox/mlxbf_pka/mlxbf_pka_dev.c
--- a/drivers/platform/mellanox/mlxbf_pka/mlxbf_pka_dev.c
+++ b/drivers/platform/mellanox/mlxbf_pka/mlxbf_pka_dev.c
@@ -707,7 +707,6 @@  static int pka_dev_create_shim(pka_dev_shim_t *shim, uint32_t shim_id,
     if (!shim->rings)
     {
         PKA_ERROR(PKA_DEV, "unable to kmalloc\n");
-        kfree(shim->rings);
         return -ENOMEM;
     }