net/mlx4: mlx4_config_dev_retrieval() - Initialize struct config_dev before using
authorMaor Gottlieb <maorg@mellanox.com>
Tue, 3 Feb 2015 15:57:16 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Feb 2015 00:17:45 +0000 (16:17 -0800)
Add Initialization to struct config_dev before filling and using it.
Fix to warning:

warning: config_dev.rx_checksum_val may be used uninitialized in this function

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/fw.c

index 4b08a393ebcbf8f126b609ffc39ccd558c1e2f44..5a21e5dc94cbae7f8c35d989aba039afcb5c4f77 100644 (file)
@@ -2169,7 +2169,7 @@ static const u8 config_dev_csum_flags[] = {
 int mlx4_config_dev_retrieval(struct mlx4_dev *dev,
                              struct mlx4_config_dev_params *params)
 {
-       struct mlx4_config_dev config_dev;
+       struct mlx4_config_dev config_dev = {0};
        int err;
        u8 csum_mask;