]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drivers/net: Eliminate useless code
authorJulia Lawall <julia@diku.dk>
Mon, 18 Jan 2010 08:29:19 +0000 (00:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jan 2010 08:29:19 +0000 (00:29 -0800)
The variable qdev is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qla3xxx.c

index f922294fd3495eb4ed74b2853431b0956178368d..4ef0afbcbe1b1980081aa147330b2e0ec4674dad 100644 (file)
@@ -4087,7 +4087,6 @@ static void __devexit ql3xxx_remove(struct pci_dev *pdev)
        struct ql3_adapter *qdev = netdev_priv(ndev);
 
        unregister_netdev(ndev);
-       qdev = netdev_priv(ndev);
 
        ql_disable_interrupts(qdev);