From: Julia Lawall Date: Mon, 18 Jan 2010 08:29:19 +0000 (-0800) Subject: drivers/net: Eliminate useless code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ae3111eafd797e24cc390bb5ce6a8fa0deacdb2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drivers/net: Eliminate useless code 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/) // @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index f922294fd349..4ef0afbcbe1b 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -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);