diff mbox series

net/mvpp2: fix possible uninitialized variable access

Message ID 20181105152522.66712-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/mvpp2: fix possible uninitialized variable access | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit Nov. 5, 2018, 3:25 p.m. UTC
Fixes: cdb53f8da628 ("net/mvpp2: support metering")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/mvpp2/mrvl_mtr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomasz Duszynski Nov. 15, 2018, 2:38 p.m. UTC | #1
On Mon, Nov 05, 2018 at 03:25:22PM +0000, Ferruh Yigit wrote:
> Fixes: cdb53f8da628 ("net/mvpp2: support metering")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/mvpp2/mrvl_mtr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c
> index 9cd53bed5..9adcd9751 100644
> --- a/drivers/net/mvpp2/mrvl_mtr.c
> +++ b/drivers/net/mvpp2/mrvl_mtr.c
> @@ -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,
> --
> 2.17.2
>

Looks good.

Acked-by: Tomasz Duszynski <tdu@semihalf.com>

--
- Tomasz Duszyński
Ferruh Yigit Nov. 16, 2018, 10:37 a.m. UTC | #2
On 11/15/2018 2:38 PM, Tomasz Duszynski wrote:
> On Mon, Nov 05, 2018 at 03:25:22PM +0000, Ferruh Yigit wrote:
>> Fixes: cdb53f8da628 ("net/mvpp2: support metering")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Tomasz Duszynski <tdu@semihalf.com>

Applied to dpdk-next-net/master, thanks.
diff mbox series

Patch

diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c
index 9cd53bed5..9adcd9751 100644
--- a/drivers/net/mvpp2/mrvl_mtr.c
+++ b/drivers/net/mvpp2/mrvl_mtr.c
@@ -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,