net/mrvl: fix crash when port is closed without starting
authorNatalie Samsonov <nsamsono@marvell.com>
Thu, 15 Mar 2018 07:51:57 +0000 (08:51 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
drivers/net/mrvl/mrvl_ethdev.c

index ac8f2d6..e313768 100644 (file)
@@ -658,7 +658,8 @@ mrvl_dev_stop(struct rte_eth_dev *dev)
                pp2_cls_qos_tbl_deinit(priv->qos_tbl);
                priv->qos_tbl = NULL;
        }
-       pp2_ppio_deinit(priv->ppio);
+       if (priv->ppio)
+               pp2_ppio_deinit(priv->ppio);
        priv->ppio = NULL;
 }