We know that "addr" is non-NULL here so there is no need to check if "addr + offset" is NULL. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/kernel/kprobes.c b/kernel/kprobes.c index d733479a10ee..88617178a63e 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1403,9 +1403,7 @@ static kprobe_opcode_t *_kprobe_addr(kprobe_opcode_t *addr, return ERR_PTR(-ENOENT); } - addr = (kprobe_opcode_t *)(((char *)addr) + offset); - if (addr) - return addr; + return (kprobe_opcode_t *)(((char *)addr) + offset); invalid: return ERR_PTR(-EINVAL); -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html