[3/5] common/cnxk: fix for inline dev pointer check
Checks
Commit Message
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: stable@dpdk.org
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/common/cnxk/roc_nix_inl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -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)