]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net/mlx5e: Fix kbuild warnings for uninitialized parameters
authorHadar Hen Zion <hadarh@mellanox.com>
Tue, 10 Jan 2017 20:33:35 +0000 (22:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 02:34:01 +0000 (21:34 -0500)
kbuild warn about parameters that may be used uninitialized, fix it.

Fixes: a54e20b4fcae ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads')
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index a35fa1eb06946a291972be6870029c90db354358..5dbc81de34ee8c3ce6172454f20705441edf719f 100644 (file)
@@ -737,8 +737,8 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
        struct flowi4 fl4 = {};
        char *encap_header;
        int encap_size;
-       __be32 saddr;
-       int ttl;
+       __be32 saddr = 0;
+       int ttl = 0;
        int err;
 
        encap_header = kzalloc(max_encap_size, GFP_KERNEL);