Add missing check of Inline device pointer before accessing
is_multi_channel variable.

Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF")
Cc: sta...@dpdk.org

Signed-off-by: Rahul Bhansali <rbhans...@marvell.com>
---
 drivers/common/cnxk/roc_nix_inl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_nix_inl.c 
b/drivers/common/cnxk/roc_nix_inl.c
index de8fd2a605..a205c658e9 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -933,7 +933,8 @@ roc_nix_inl_inb_init(struct roc_nix *roc_nix)
        inl_dev = idev->nix_inl_dev;
 
        roc_nix->custom_meta_aura_ena = (roc_nix->local_meta_aura_ena &&
-                                        (inl_dev->is_multi_channel || 
roc_nix->custom_sa_action));
+                                        ((inl_dev && 
inl_dev->is_multi_channel) ||
+                                         roc_nix->custom_sa_action));
        if (!roc_model_is_cn9k() && !roc_errata_nix_no_meta_aura()) {
                nix->need_meta_aura = true;
                if (!roc_nix->local_meta_aura_ena || 
roc_nix->custom_meta_aura_ena)
-- 
2.25.1

Reply via email to