Staging: rtl8192u: Remove unnecessary variable
authorCristina Opriceana <cristina.opriceana@gmail.com>
Thu, 12 Mar 2015 02:21:29 +0000 (04:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2015 14:54:13 +0000 (15:54 +0100)
commit6c14378eca6f2f66438799e76845c3f2bbdafb57
treeba3e29dafc72efc2879a876be3cc17a5b5252a20
parentacc6539fe6293373ded751162e77c10f532336c6
Staging: rtl8192u: Remove unnecessary variable

This patch detects the cases in which a variable is not modified through
the code and it is used as a return value. The variable is detected and
removed by coccinelle using the following semantic patch:

@@ type T; expression expr; identifier r; constant c; @@

-T r = expr;
... when != r
    when strict
-return r;
+return expr;

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c