ARC: Remove a redundant memset()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 22 Mar 2022 19:49:05 +0000 (20:49 +0100)
committerVineet Gupta <vgupta@kernel.org>
Mon, 18 Apr 2022 19:22:09 +0000 (12:22 -0700)
disasm_instr() already call memset(0) on its 2nd argument, so there is no
need to clear it explicitly before calling this function.

Remove the redundant memset().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
arch/arc/kernel/disasm.c

index 897d5d70b39a73987949114be24ff7a3fa6232e2..1e1db51b69414362f67e62813df484a39f1690ec 100644 (file)
@@ -503,7 +503,6 @@ int __kprobes disasm_next_pc(unsigned long pc, struct pt_regs *regs,
 {
        struct disasm_state instr;
 
-       memset(&instr, 0, sizeof(struct disasm_state));
        disasm_instr(pc, &instr, 0, regs, cregs);
 
        *next_pc = pc + instr.instr_len;