]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: media: davinci_vpfe: remove unnecessary ret variable
authorThaissa Falbo <thaissa.falbo@gmail.com>
Thu, 18 Feb 2016 16:18:12 +0000 (14:18 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:56:47 +0000 (14:56 -0800)
commitafa5d19a2b5fbf0bbcce34f3613bce2bc9479bb7
treea198830a41ed28109238901fc450ad9fb2f7fd1e
parent8e8919feb64eed65c3db975553fc8db086804640
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>
drivers/staging/media/davinci_vpfe/vpfe_video.c