Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3726425rdb; Wed, 27 Dec 2023 19:09:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWiSwKKA3hFKWY1mT/qPvxFh8LF87QIOdeJzyiELg5McAC7jTLOeFbVjGOIeQtLIq+ObRK X-Received: by 2002:a17:902:e892:b0:1d3:fe01:17ec with SMTP id w18-20020a170902e89200b001d3fe0117ecmr13570964plg.18.1703732960395; Wed, 27 Dec 2023 19:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703732960; cv=none; d=google.com; s=arc-20160816; b=CorNyg0bhbNQfWrtYXe01FG3kMB7TTsLAS+cN6jiNw9aiixcMeVaeusuWGTzhsVZel dvJRY2ZQZsdMoZaDJrBHOsc1G88nDDe+U0DlTc3ifv2chx5DPgBSzOsz0XS0pVg2gJ10 s08Q99m3dKEQT3d7pJAvck/ypNBwigmV0VVA1Pn7LwyXbQmEB0owPp4pbs6UN3X6eYuB tzzHyPtROPq6S/RDDu04R3oXbn2bMqkGhW0dsl518c8PCr7V11Yyn2XDqg3ODo41s8Yl xU0+b0equlREaV6YAcxZpUwsbz1xs2aBPzk64KsQhgkDRl/GIEd2Sk0JjX50PIqUjkHj Mljg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=sa6NFNl6Lmf5X3XnINSKpAEYW8vUgH6fbly5Ko16Wuc=; fh=95s5pPBfooz2jZ19PGrn6cKeEbsfx2+H2Ck7dLws95w=; b=YAH6rE7Fms0h8EsR75ojqfvfsg7JPHida+caL+9i8rJD7GWjH1RYFZoVSRH9he4a6J ISW6VJtIxVqqDuX0nqFzxRZ4qi8meSigpkCZ2/FU8THKApIs7l0Iqr6HZSe+N+A5gSeV dTbuOFTfzAdrd9Yqp6AxRPGpf+kRKXtTFRx1DwKfY76k2Jw4IhDYzeIP/gCbte73irwP t1Snz7oDOt50dy0KiRdBbIWNVJKucgSYGpzIWGin2BL896CQy54+F6DP2oAipzu/w3Lx 5T7BiaesmXc9b11FIMu5LqbBVjTobHUhF68xGymhF8MFtz516NTD1IP8IgdDNHeGryYd lF3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12400-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12400-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y3-20020a17090322c300b001d43dc0c8e2si8141544plg.91.2023.12.27.19.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 19:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12400-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12400-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12400-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 183CD2826F8 for ; Thu, 28 Dec 2023 03:09:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CACAD15BB; Thu, 28 Dec 2023 03:09:11 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 09B8B10F2; Thu, 28 Dec 2023 03:09:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 568476019ED87; Thu, 28 Dec 2023 11:08:55 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: serge@hallyn.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kernel:=20capability:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20ret?= Date: Thu, 28 Dec 2023 11:08:54 +0800 Message-Id: <20231228030854.11689-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ret variable is assigned when it does not need to be defined, as it has already been assigned before use. Signed-off-by: Li zeming --- kernel/capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/capability.c b/kernel/capability.c index dac4df77e376e..ed8a983e21da4 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -140,7 +140,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, */ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) { - int ret = 0; + int ret; pid_t pid; unsigned tocopy; kernel_cap_t pE, pI, pP; -- 2.18.2