diff options
author | Simon Horman <horms@kernel.org> | 2023-06-06 16:49:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-07 14:28:58 +0300 |
commit | e7214663e023be5e518e8d0d8f2dca6848731652 (patch) | |
tree | 742bee987602ee3e0537a21db179f167c77c76c2 /tools/net/ynl | |
parent | 92db9e2e0498b92d0a57cc48ea869ddabda934d9 (diff) | |
download | linux-e7214663e023be5e518e8d0d8f2dca6848731652.tar.xz |
net: txgbe: Avoid passing uninitialised parameter to pci_wake_from_d3()
txgbe_shutdown() relies on txgbe_dev_shutdown() to initialise
wake by passing it by reference. However, txgbe_dev_shutdown()
doesn't use this parameter at all.
wake is then passed uninitialised by txgbe_dev_shutdown()
to pci_wake_from_d3().
Resolve this problem by:
* Removing the unused parameter from txgbe_dev_shutdown()
* Removing the uninitialised variable wake from txgbe_dev_shutdown()
* Passing false to pci_wake_from_d3() - this assumes that
although uninitialised wake was in practice false (0).
I'm not sure that this counts as a bug, as I'm not sure that
it manifests in any unwanted behaviour. But in any case, the issue
was introduced by:
3ce7547e5b71 ("net: txgbe: Add build support for txgbe")
Flagged by Smatch as:
.../txgbe_main.c:486 txgbe_shutdown() error: uninitialized symbol 'wake'.
No functional change intended.
Compile tested only.
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/net/ynl')
0 files changed, 0 insertions, 0 deletions