]>
git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
staging: media: davinci_vpfe: remove unnecessary ret variable
Simplified return of funcions by removing assignment of ret variable.
Coccinelle script used:
@@
local idexpression ret;
expression e;
@@
- ret = e;
- if(ret)
- return ret;
+ if(e)
+ return e;
@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;
@@
local idexpression ret;
expression e;
@@
- ret = e;
- if(ret){
+ if(e){
... when != ret
- return ret;
+ return e;
}
@@
type T; identifier i;
@@
- T i;
... when != i
Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>