Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25556560rwd; Sun, 2 Jul 2023 20:18:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBKW7Y1TC8ijvw4r/TLEoiz+nWklSJhr4LIQ3tix5zi1XQwffe25dNhvviEipfEMYXSaSA X-Received: by 2002:a0d:dd88:0:b0:579:e5fb:f6c5 with SMTP id g130-20020a0ddd88000000b00579e5fbf6c5mr4572654ywe.2.1688354289830; Sun, 02 Jul 2023 20:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688354289; cv=none; d=google.com; s=arc-20160816; b=uSJJ/iBzlJ1LCeWXA/sslqzBFCc2W8PbLZZzfjh6skZhetWWZX9hpF9/p2tU3oJN6v BV+4mtjLdAtPi65JrQslQZQqhusIyS7fpMkskEfy1AmMuUcBgV/odI4ISC6t1268XORi u8C2IKUPHSmBV4vg/ieNu61cGe4sVeaWvqxIWh+fH3QSj2kKCJNXvhgcsFQ98EozP7kJ Q5uVH6rWbzPlu64u0KP4hxNZGhLv8Evxy+PZxnJFRKXZN0P3YDoliZPwv2poxPd3u+Bi /jqcmviqS2hNVnvkh7Li+xE4lTBBW2oQ7LdZ9he/u6HEtZjPcSV5+BXoMumf/LKb3KNN ldCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8XmfirOA9DvUX9Xnyl7dtRuRS2U51PtVClRnP+wtdUA=; fh=MDcLyW7gnQ7zhVrwu4ydSY34K8iXsxgpLnkzEl2cuwA=; b=fpkmIHMOfvokpxhZUZsULkszWibqE5DGLBJOK88LZdTlzfl0bY7SUhl0ISAp5Bpvsg 9XR2uFXqKguGdv6hToutRPjt9wQ6j57Ss44TPZcSaCuWqoFvCDr7xmhGB/A53BBsEOE1 t7u8aswB+2/er1MERnGVvWmlTYiwaiyqEW/E0aAsDdD66oW0czP33aC2dETehYM7K5Pm wDGXFI1gBGGefGPqr22MVC2HlJfLxSin+ilVfyBst3sSdzRSo2u8PVcBewuOlEb3W3rq 3PQcAwLqdTBOsi0+37eoWVdVXrgV+J7Vh6NRTA/V7r8FAI0Ftd2y5ZqmduCiPmPm8A+L yRsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0055b12486641si10953652pgq.186.2023.07.02.20.17.55; Sun, 02 Jul 2023 20:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230149AbjGCCuT (ORCPT + 99 others); Sun, 2 Jul 2023 22:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjGCCuS (ORCPT ); Sun, 2 Jul 2023 22:50:18 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id E8FBAE44; Sun, 2 Jul 2023 19:50:08 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 83FBB609158B7; Mon, 3 Jul 2023 10:49:54 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, mhiramat@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kprobes:=20Remove=20unnecessary=20=E2=80=980?= =?UTF-8?q?=E2=80=99=20values=20from=20ret?= Date: Wed, 5 Jul 2023 03:21:07 +0800 Message-Id: <20230704192107.2944-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 00e177de91cc..db8a3aa53cf6 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1072,7 +1072,7 @@ static int kprobe_ftrace_enabled; static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, int *cnt) { - int ret = 0; + int ret; lockdep_assert_held(&kprobe_mutex); @@ -1110,7 +1110,7 @@ static int arm_kprobe_ftrace(struct kprobe *p) static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, int *cnt) { - int ret = 0; + int ret; lockdep_assert_held(&kprobe_mutex); -- 2.18.2