[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210203133834.22388-1-colin.king@canonical.com>
Date: Wed, 3 Feb 2021 13:38:34 +0000
From: Colin King <colin.king@...onical.com>
To: Manish Chopra <manishc@...vell.com>, GR-Linux-NIC-Dev@...vell.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Coiby Xu <coiby.xu@...il.com>, netdev@...r.kernel.org,
devel@...verdev.osuosl.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] staging: qlge: fix read of an uninitialized pointer
From: Colin Ian King <colin.king@...onical.com>
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 <colin.king@...onical.com>
---
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
Powered by blists - more mailing lists