Skip to content
Commit 6c14378e authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman
Browse files

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: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent acc6539f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment