Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li zeming and committed by
Masami Hiramatsu (Google)
ed9492df e1164787

+3 -3
+3 -3
kernel/kprobes.c
··· 1072 1072 static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, 1073 1073 int *cnt) 1074 1074 { 1075 - int ret = 0; 1075 + int ret; 1076 1076 1077 1077 lockdep_assert_held(&kprobe_mutex); 1078 1078 ··· 1110 1110 static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, 1111 1111 int *cnt) 1112 1112 { 1113 - int ret = 0; 1113 + int ret; 1114 1114 1115 1115 lockdep_assert_held(&kprobe_mutex); 1116 1116 ··· 2692 2692 2693 2693 static int __init init_kprobes(void) 2694 2694 { 2695 - int i, err = 0; 2695 + int i, err; 2696 2696 2697 2697 /* FIXME allocate the probe table, currently defined statically */ 2698 2698 /* initialize all list heads */