]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ozwpan: Remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Tue, 20 May 2014 10:33:47 +0000 (12:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 12:11:57 +0000 (21:11 +0900)
commitca4ee6e15ce61041ee5483cd2b241795a870ff90
treec5006cf48412791fbf17b67545d3f7ca5086cc09
parent9c2abc48a65cb6f2554371b43fe6413c93f07288
staging: ozwpan: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ozwpan/ozhcd.c