net/mvpp2: fix possible uninitialized variable access
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 5 Nov 2018 15:25:22 +0000 (15:25 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Nov 2018 10:13:51 +0000 (11:13 +0100)
Fixes: cdb53f8da628 ("net/mvpp2: support metering")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
drivers/net/mvpp2/mrvl_mtr.c

index 9cd53be..9adcd97 100644 (file)
@@ -422,7 +422,7 @@ mrvl_meter_profile_update(struct rte_eth_dev *dev, uint32_t mtr_id,
        struct mrvl_priv *priv = dev->data->dev_private;
        struct mrvl_mtr_profile *profile;
        struct mrvl_mtr *mtr;
-       int ret, enabled;
+       int ret, enabled = 0;
 
        if (!priv->ppio)
                return -rte_mtr_error_set(error, EPERM,