提交 08d9e736 编写于 作者: J Julia Lawall 提交者: Linus Torvalds

drivers/misc/iwmc3200top/main.c: eliminate useless code

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: NJulia Lawall <julia@diku.dk>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7463e633
...@@ -597,8 +597,6 @@ static void iwmct_remove(struct sdio_func *func) ...@@ -597,8 +597,6 @@ static void iwmct_remove(struct sdio_func *func)
struct iwmct_work_struct *read_req; struct iwmct_work_struct *read_req;
struct iwmct_priv *priv = sdio_get_drvdata(func); struct iwmct_priv *priv = sdio_get_drvdata(func);
priv = sdio_get_drvdata(func);
LOG_INFO(priv, INIT, "enter\n"); LOG_INFO(priv, INIT, "enter\n");
sdio_claim_host(func); sdio_claim_host(func);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册