From patchwork Tue Feb 3 15:57:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Vadai X-Patchwork-Id: 435968 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E46731401D0 for ; Wed, 4 Feb 2015 02:58:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966343AbbBCP6e (ORCPT ); Tue, 3 Feb 2015 10:58:34 -0500 Received: from mailp.voltaire.com ([193.47.165.129]:40311 "EHLO mellanox.co.il" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S966308AbbBCP6c (ORCPT ); Tue, 3 Feb 2015 10:58:32 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from amirv@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Feb 2015 17:57:57 +0200 Received: from swl095.mtl.labs.mlnx (swl095.mtl.labs.mlnx [10.7.17.95]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id t13FvvMk007544; Tue, 3 Feb 2015 17:57:57 +0200 From: Amir Vadai To: "David S. Miller" Cc: netdev@vger.kernel.org, Amir Vadai , Or Gerlitz , Yevgeny Petrilin , Maor Gottlieb Subject: [PATCH net-next 2/7] net/mlx4: mlx4_config_dev_retrieval() - Initialize struct config_dev before using Date: Tue, 3 Feb 2015 17:57:16 +0200 Message-Id: <1422979041-25208-3-git-send-email-amirv@mellanox.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1422979041-25208-1-git-send-email-amirv@mellanox.com> References: <1422979041-25208-1-git-send-email-amirv@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Maor Gottlieb 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 Signed-off-by: Amir Vadai --- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index dbabfae..241838f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -2162,7 +2162,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;