summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-18 09:05:05 +0200
committerKees Cook <keescook@chromium.org>2021-03-02 04:19:44 +0100
commitb924a8197ac7660eb358ed0277bd5b12f9b40fe2 (patch)
treef64fe294be97e732b983c16e392b1dfb4c180c56 /scripts
parentLinux 5.12-rc1 (diff)
downloadlinux-b924a8197ac7660eb358ed0277bd5b12f9b40fe2.tar.xz
linux-b924a8197ac7660eb358ed0277bd5b12f9b40fe2.zip
gcc-plugins: structleak: remove unneeded variable 'ret'
Fix the following coccicheck warning: scripts/gcc-plugins/structleak_plugin.c:177:14-17: Unneeded variable: "ret". Return "0" on line 207 Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200418070505.10715-1-yanaijie@huawei.com
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gcc-plugins/structleak_plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/gcc-plugins/structleak_plugin.c b/scripts/gcc-plugins/structleak_plugin.c
index 29b480c33a8d..d7190e443a14 100644
--- a/scripts/gcc-plugins/structleak_plugin.c
+++ b/scripts/gcc-plugins/structleak_plugin.c
@@ -170,7 +170,6 @@ static void initialize(tree var)
static unsigned int structleak_execute(void)
{
basic_block bb;
- unsigned int ret = 0;
tree var;
unsigned int i;
@@ -200,7 +199,7 @@ static unsigned int structleak_execute(void)
initialize(var);
}
- return ret;
+ return 0;
}
#define PASS_NAME structleak