drivers/misc/iwmc3200top/main.c: eliminate useless code
authorJulia Lawall <julia@diku.dk>
Fri, 5 Mar 2010 21:42:47 +0000 (13:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:32 +0000 (11:26 -0800)
The variable priv 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>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/iwmc3200top/main.c

index dd0a3913bf6d00cd14dfec797fa89026b4218d87..3b7292a5cea95916cdf4574393c6664a38bc648b 100644 (file)
@@ -597,8 +597,6 @@ static void iwmct_remove(struct sdio_func *func)
        struct iwmct_work_struct *read_req;
        struct iwmct_priv *priv = sdio_get_drvdata(func);
 
-       priv = sdio_get_drvdata(func);
-
        LOG_INFO(priv, INIT, "enter\n");
 
        sdio_claim_host(func);