Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp285151pxb; Wed, 3 Feb 2021 05:42:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzI10YbsK/s8PTXcd4rY6CEmSlfItt56jiiV31g+QtuL8ust08JaCk/ByvP5GIX8mcaOmoP X-Received: by 2002:aa7:db4e:: with SMTP id n14mr2952778edt.101.1612359732778; Wed, 03 Feb 2021 05:42:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612359732; cv=none; d=google.com; s=arc-20160816; b=q7+GwaxphAAQKvx8ugln4SPI42y9UA8Q+C3JZ4UzCkdyCgIAavYwXWBrkUgeh4GIAi OxcFbKPctZYDSJkByowVtJ9fT46ryj1MqZpdRYcNE8V7Gz1XrAgvcU6cEpRazPIpof2B DYLyGawMn6TGJfKPJ1zvhDM/rmurcPKCUfcVkMgBMAQG756Y4WyL0Segph/hgWH+/Sc9 uO6plVd4ZOs1J6mnBRNggdy9sxhANTokeCrq8rDRoK09mY7CrVumRLCnceseq+9ecAq2 qyOtkx908jbi1jFe0zQ49AcpdEBODgslrAF6cVpri5pr7GAGAbJniRS78cM3IUXFn9wl Phlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xyEhbF1PJJW1nZJBbwPIOLZ0IShPa6vfP5Ni2Dcr9TQ=; b=0plTchrykQKQMWmK+VUmWIXfQYX8ismjwIdeIn4y4A+vzDaXCt0PpjppVi43MpbTqc yWnzaiX83FGT8th+kpEtL8ag2yCV9YfrIiY0+H4KSNq6kIGK5D/5Zh9/YVaz59YleFq3 XUlSG51NE9vugWEt6gwuwQSgomCdZHiWC9ryJ76xrnPFQCbZEEkfPgV1WmEBaHxB/9cU 2auKJaRv3uaxGkKy5qJw2I41Y3juvmDjefJnuBhzzjwhGDfTXAt/ILSsKxJVQ4mss6q9 YD8YR4tdWxRCyY3nd7qFhKIJs7tDcmPagPn4IaegoG+FALxJgKv0lXhpAKCucoJ0UO5l nPgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si1415596ejb.324.2021.02.03.05.41.48; Wed, 03 Feb 2021 05:42:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232245AbhBCNj1 (ORCPT + 99 others); Wed, 3 Feb 2021 08:39:27 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:37195 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbhBCNjT (ORCPT ); Wed, 3 Feb 2021 08:39:19 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7IMd-0007Q7-2D; Wed, 03 Feb 2021 13:38:35 +0000 From: Colin King To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , Coiby Xu , netdev@vger.kernel.org, devel@driverdev.osuosl.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] staging: qlge: fix read of an uninitialized pointer Date: Wed, 3 Feb 2021 13:38:34 +0000 Message-Id: <20210203133834.22388-1-colin.king@canonical.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently the pointer 'reporter' is not being initialized and is being read in a netdev_warn message. The pointer is not used and is redundant, fix this by removing it and replacing the reference to it with priv->reporter instead. Addresses-Coverity: ("Uninitialized pointer read") Fixes: 1053c27804df ("staging: qlge: coredump via devlink health reporter") Signed-off-by: Colin Ian King --- drivers/staging/qlge/qlge_devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_devlink.c b/drivers/staging/qlge/qlge_devlink.c index c6ef5163e241..86834d96cebf 100644 --- a/drivers/staging/qlge/qlge_devlink.c +++ b/drivers/staging/qlge/qlge_devlink.c @@ -150,7 +150,6 @@ static const struct devlink_health_reporter_ops qlge_reporter_ops = { void qlge_health_create_reporters(struct qlge_adapter *priv) { - struct devlink_health_reporter *reporter; struct devlink *devlink; devlink = priv_to_devlink(priv); @@ -160,5 +159,5 @@ void qlge_health_create_reporters(struct qlge_adapter *priv) if (IS_ERR(priv->reporter)) netdev_warn(priv->ndev, "Failed to create reporter, err = %ld\n", - PTR_ERR(reporter)); + PTR_ERR(priv->reporter)); } -- 2.29.2