Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4199527imm; Mon, 17 Sep 2018 09:44:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZCpdZ1JUhKM1NoDhjUE2wMwxCWJgLurgLj8aynzcC1GMsD5RBzCcP1W9DEOjGJd59e3BSo X-Received: by 2002:a62:9f85:: with SMTP id v5-v6mr26652598pfk.27.1537202651901; Mon, 17 Sep 2018 09:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537202651; cv=none; d=google.com; s=arc-20160816; b=ctzFZaEYjLn9GqvJO2GbO1RUYtWHHaU6QmYeCohGapMwX91sqdqXHI3lO8hYtxOpIC iptRXopy0tiMed96B1NcuOKDlmTyLfRdtL6OgNTi1PtnCQJmzolqr9QvG1bP48cWpoxz 6lT/ZD4NJ5XWC/nsGSWNJKS7sx7A4z/F/ZWDZzvZnjVQ5D9kAAqFWgIe9TjWunTtAgZf K/KVKn2soDQHa4WIvCAj/bpQZfF9wVU5IYtNr3eTeZg6jvlx1flNkdrrjNuoTVq9ny/K K2OmmUboM220Z3g4DBlvJ/q8B29RNAFAT8SgMoGdlziv64UHdsD8SOb8Ur6wkdnX+4GQ Aysw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=NuTcwx3RHAdC5adsqBYSkaODHK+S2sYFcVXDwMDrAjE=; b=bIlTF3B3tKV9tDDBofuZRTuoQIak+1omQK2knPI3qVRG7USrXm1nzfi7j8615FKBcr VLAIs9gvs4O7eQLXM3Mc71Qru5SPIvIvZ1cOa7YbGLjtI2xESo2Ze5uKkMXiycnDBw4+ 5uPdCjlQhsO1Uy1vOAhVBo/cAsJOG2yIMn5yMhos6GbJjJU5dMH9vB3Ni5mFEp3cZhMM 4wcF/SguLgiiTENshiuOXZCogZZe4MOCsHFGFJGOuZNNrA4UxK3/NC6dEqLtn8F1kLy+ t1FCq/rk/7HrBa/yGxWW9Tz9+B+uEPiS8b3x4tVAOQGU1GlcZo3IE5BCDFO1Co595IV3 udAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f91-v6si16134269plf.376.2018.09.17.09.43.55; Mon, 17 Sep 2018 09:44:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728735AbeIQWL4 (ORCPT + 99 others); Mon, 17 Sep 2018 18:11:56 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12592 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728455AbeIQWL4 (ORCPT ); Mon, 17 Sep 2018 18:11:56 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id BC6361BA55BCB; Tue, 18 Sep 2018 00:43:42 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.399.0; Tue, 18 Sep 2018 00:43:41 +0800 From: zhong jiang To: CC: , , Subject: [PATCH] net: bnxt: Fix a uninitialized variable warning. Date: Tue, 18 Sep 2018 00:31:23 +0800 Message-ID: <1537201883-2518-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following compile warning: drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:49:5: warning: ‘nvm_param.dir_type’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (nvm_param.dir_type == BNXT_NVM_PORT_CFG) Signed-off-by: zhong jiang --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index f3b9fbc..ab88217 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -31,7 +31,7 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg, { struct hwrm_nvm_get_variable_input *req = msg; void *data_addr = NULL, *buf = NULL; - struct bnxt_dl_nvm_param nvm_param; + struct bnxt_dl_nvm_param nvm_param = {0}; int bytesize, idx = 0, rc, i; dma_addr_t data_dma_addr; -- 1.7.12.4