On Mon, Mar 28, 2022 at 4:11 PM Volodymyr Fialko <vfia...@marvell.com> wrote: > > Inline device could be null in cases when it was not bound or missing. > Added check to prevent null pointer access. > > Fixes: fe5846bcc07 ("net/cnxk: add devargs for min-max SPI") > > Cc: sta...@dpdk.org > > Signed-off-by: Volodymyr Fialko <vfia...@marvell.com>
Acked-by: Jerin Jacob <jer...@marvell.com> Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > drivers/common/cnxk/roc_nix_inl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/common/cnxk/roc_nix_inl.c > b/drivers/common/cnxk/roc_nix_inl.c > index 877a9f1aa8..d0a38d2d4d 100644 > --- a/drivers/common/cnxk/roc_nix_inl.c > +++ b/drivers/common/cnxk/roc_nix_inl.c > @@ -158,6 +158,8 @@ roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix, bool > inb_inl_dev, > > inl_dev = idev->nix_inl_dev; > if (inb_inl_dev) { > + if (inl_dev == NULL) > + goto exit; > min = inl_dev->ipsec_in_min_spi; > max = inl_dev->ipsec_in_max_spi; > mask = inl_dev->inb_spi_mask; > -- > 2.25.1 >