staging: android: ion: hisilicon: Remove useless return variables
PATCH v4 1/5 staging: android: ion: hisilicon: Remove useless return variables
This patch removes unnecessary return variables and compresses the return logic.
The coccinelle script that finds and fixes this issue is:
@@ type T; identifier i,f; constant C; @@
- T i;
...when != i
when strict
( return -C;
|
- i =
+ return
f(...);
- return i;
)
Signed-off-by Bhaktipriya Shridhar <[email protected]>
---
Changes in v4:
-No change
drivers/staging/android/ion/hisilicon/hi6220_ion.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/android/ion/hisilicon/hi6220_ion.c +1 -4
@@ -214,10 +214,7 @@ static struct platform_driver hi6220_ion_driver = {static int __init hi6220_ion_init (void ) { -int ret; - - ret =platform_driver_register (&hi6220_ion_driver); -return ret; +return platform_driver_register (&hi6220_ion_driver); }subsys_initcall (hi6220_ion_init);
--
2.1.4