[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230802013630.7589-1-kunyu@nfschina.com>
Date: Wed, 2 Aug 2023 09:36:30 +0800
From: Li kunyu <kunyu@...china.com>
To: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, namhyung@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Li kunyu <kunyu@...china.com>
Subject: [PATCH] events: core: Remove unnecessary ‘0’ values from ret
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@...china.com>
---
kernel/events/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index db016e418931..97e69a558774 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -924,7 +924,7 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event,
struct perf_cgroup *cgrp;
struct cgroup_subsys_state *css;
struct fd f = fdget(fd);
- int ret = 0;
+ int ret;
if (!f.file)
return -EBADF;
@@ -6371,7 +6371,7 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
unsigned long vma_size;
unsigned long nr_pages;
long user_extra = 0, extra = 0;
- int ret = 0, flags = 0;
+ int ret, flags = 0;
/*
* Don't allow mmap() of inherited per-task counters. This would
--
2.18.2
Powered by blists - more mailing lists