Skip to content

Commit

Permalink
drivers/misc/iwmc3200top/main.c: eliminate useless code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Linus Torvalds committed Mar 6, 2010
1 parent 7463e63 commit 08d9e73
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/misc/iwmc3200top/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 08d9e73

Please sign in to comment.