Linux Kernels

staging: android: ion: hisilicon: Remove useless return variables

This change “staging: android: ion: hisilicon: Remove useless return variables” (commit dd28473) in Linux kernel is authored by Bhaktipriya Shridhar <bhaktipriya96 [at] gmail.com> on Thu Feb 25 17:24:17 2016 +0530.

Description of "staging: android: ion: hisilicon: Remove useless return variables"

The change “staging: android: ion: hisilicon: Remove useless return variables” introduces changes as follows.

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 <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit dd28473

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: android: ion: hisilicon: Remove useless return variables"

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/android/ion/hisilicon/hi6220_ion.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
 
diff --git a/drivers/staging/android/ion/hisilicon/hi6220_ion.c b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
index e3c07b2ba00e..fe9f0fd210cd 100644
--- a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
+++ b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
@@ -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);

The commit for this change in Linux stable tree is dd28473 (patch).

Last modified: 2020/01/11 06:51