Skip to content

Commit

Permalink
net: dl2k: remove redundant re-assignment to np
Browse files Browse the repository at this point in the history
The pointer np is initialized and then re-assigned the same value
a few lines later. Remove the redundant duplicated assignment. Cleans
up clang warning:

drivers/net/ethernet/dlink/dl2k.c:314:25: warning: Value stored to
'np' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Nov 2, 2017
1 parent 3a1246f commit 5618c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/dlink/dl2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ find_miiphy (struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
int i, phy_found = 0;
np = netdev_priv(dev);

np->phy_addr = 1;

for (i = 31; i >= 0; i--) {
Expand Down

0 comments on commit 5618c8e

Please sign in to comment.