diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-01-02 11:28:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-03 19:35:17 -0500 |
commit | 2d4dda781fc1e9c929a1f699119b91eddbcf475c (patch) | |
tree | b44d77b2534ed7d26137b1819e013c34c4743c58 | |
parent | c1ddf295f5183a5189196a8035546842caa2055a (diff) |
net: tulip: delete useless tests on netdev_priv
Netdev_priv performs an addition, not a pointer dereference, so it seems
quite unlikely that its result would ever be NULL.
A semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
statement S;
@@
- if (!netdev_priv(...)) S
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/dec/tulip/uli526x.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c index a5397b130724..aa4ee385091f 100644 --- a/drivers/net/ethernet/dec/tulip/uli526x.c +++ b/drivers/net/ethernet/dec/tulip/uli526x.c | |||
@@ -1192,9 +1192,6 @@ static int uli526x_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1192 | 1192 | ||
1193 | ULI526X_DBUG(0, "uli526x_suspend", 0); | 1193 | ULI526X_DBUG(0, "uli526x_suspend", 0); |
1194 | 1194 | ||
1195 | if (!netdev_priv(dev)) | ||
1196 | return 0; | ||
1197 | |||
1198 | pci_save_state(pdev); | 1195 | pci_save_state(pdev); |
1199 | 1196 | ||
1200 | if (!netif_running(dev)) | 1197 | if (!netif_running(dev)) |
@@ -1228,9 +1225,6 @@ static int uli526x_resume(struct pci_dev *pdev) | |||
1228 | 1225 | ||
1229 | ULI526X_DBUG(0, "uli526x_resume", 0); | 1226 | ULI526X_DBUG(0, "uli526x_resume", 0); |
1230 | 1227 | ||
1231 | if (!netdev_priv(dev)) | ||
1232 | return 0; | ||
1233 | |||
1234 | pci_restore_state(pdev); | 1228 | pci_restore_state(pdev); |
1235 | 1229 | ||
1236 | if (!netif_running(dev)) | 1230 | if (!netif_running(dev)) |