mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
staging: qlge: fix read of an uninitialized pointer
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.
Fixes: 1053c27804 ("staging: qlge: coredump via devlink health reporter")
Reviewed-by: Coiby Xu <coiby.xu@gmail.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Uninitialized pointer read")
Link: https://lore.kernel.org/r/20210203133834.22388-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9810cad7da
commit
0732ce2132
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user