Skip to content
Commit c3397c1b authored by Thaissa Falbo's avatar Thaissa Falbo Committed by Greg Kroah-Hartman
Browse files

staging: media: davinci_vpfe: remove ret variable in switch statements



Remove ret variable in functions that used it to determine the return.
Simplified the return logic for these functions.

Found with Coccinelle script:

@@
local idexpression ret;
expression c,d;
identifier label;
@@

switch ( ... ) {
case label :
...
- ret = c;
- break;
+ return c;
...
default:
...
- ret = d;
+ return d;
...
}
... when != ret
- return ret;

@@
type T; identifier i;
@@
- T i;
... when != i

Signed-off-by: default avatarThaissa Falbo <thaissa.falbo@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent afa5d19a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment