Skip to contentSkip to conversation

lan743x: remove redundant intializations of pointers adapter and phydev

PATCH Applied Colin King 2 participants 2 messages Mar 28, 2021 – Mar 29, 2021

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 lan743x: remove redundant intializations of pointers adapter and phydev

From: Colin Ian King <[email protected]>

The pointers adapter and phydev are being initialized with values that are never read and are being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/net/ethernet/microchip/lan743x_ethtool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan743x_ethtool.c +2 -2
index c5de8f46cdd3..91a755efe2e6 100644
@@ -730,8 +730,8 @@ static int lan743x_ethtool_get_eee(struct net_device *netdev,
 static int lan743x_ethtool_set_eee(struct net_device *netdev,
 				   struct ethtool_eee *eee)
 {
-	struct lan743x_adapter *adapter = netdev_priv(netdev);
-	struct phy_device *phydev = NULL;
+	struct lan743x_adapter *adapter;
+	struct phy_device *phydev;
 	u32 buf = 0;
 	int ret = 0;
 
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 10 lines · On Sun, 28 Mar 2021 22:46:47 +0100 you wrote:

From: Colin Ian King <[email protected]>

The pointers adapter and phydev are being initialized with values that are never read and are being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

[...]

Here is the summary with links:
- lan743x: remove redundant intializations of pointers adapter and phydev

    https://git.kernel.org/netdev/net-next/c/37f368d8d09d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html