Skip to content

Commit ed9492d

Browse files
Li zemingmhiramat
authored andcommitted
kernel: kprobes: Remove unnecessary ‘0’ values
it is assigned first, so it does not need to initialize the assignment. Link: https://lore.kernel.org/all/20230711185353.3218-1-zeming@nfschina.com/ Signed-off-by: Li zeming <zeming@nfschina.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
1 parent e116478 commit ed9492d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/kprobes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ static int kprobe_ftrace_enabled;
10721072
static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
10731073
int *cnt)
10741074
{
1075-
int ret = 0;
1075+
int ret;
10761076

10771077
lockdep_assert_held(&kprobe_mutex);
10781078

@@ -1110,7 +1110,7 @@ static int arm_kprobe_ftrace(struct kprobe *p)
11101110
static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
11111111
int *cnt)
11121112
{
1113-
int ret = 0;
1113+
int ret;
11141114

11151115
lockdep_assert_held(&kprobe_mutex);
11161116

@@ -2692,7 +2692,7 @@ void kprobe_free_init_mem(void)
26922692

26932693
static int __init init_kprobes(void)
26942694
{
2695-
int i, err = 0;
2695+
int i, err;
26962696

26972697
/* FIXME allocate the probe table, currently defined statically */
26982698
/* initialize all list heads */

0 commit comments

Comments
 (0)