staging: rtl8712: Make return of 0 explicit
commit40430f0ce24111cf616a51c704ecb371858e2028
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Thu, 25 Feb 2016 10:47:33 +0000 (25 16:17 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (11 22:09 -0800)
tree36e6717b978311c6a3e8598847b499b3f3f3cd93
parent9155c92463ecbb55c6eca6145e139869e9ba1546
staging: rtl8712: Make return of 0 explicit

Delete unnecessary local variable whose value is always 0 and
return 0 as the result.

The following Coccinelle script was used:

@@
identifier ret; expression E;
type T;
@@
(
- T ret;
|
- T ret = 0;
)

... when != \(ret=E
\|ret--\|ret++\|--ret\|++ret\|ret-=E\|ret+=E\|ret|=E\|ret&=E\)
(
?-ret = 0;
)
... when != \(ret=E
\|ret--\|ret++\|--ret\|++ret\|ret-=E\|ret+=E\|ret|=E\|ret&=E\)
(
return
- ret
+ 0
;
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/xmit_linux.c