From patchwork Wed Nov 2 13:46:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhang.songyi@zte.com.cn X-Patchwork-Id: 14238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3629047wru; Wed, 2 Nov 2022 06:47:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7rG25WcgcRX8a3u4dG8OiSOUPK7u1ZXA1lpIIufBkIvp/hBTEouGBU7d86bxX67ZRM1yXD X-Received: by 2002:a17:907:7704:b0:780:da38:4480 with SMTP id kw4-20020a170907770400b00780da384480mr24245716ejc.64.1667396855830; Wed, 02 Nov 2022 06:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667396855; cv=none; d=google.com; s=arc-20160816; b=I0x0kQkH9+WzQ8sFItG7VRaXaomFrr+uMl6CkPaY0mxlc8yJBVY62chcNUmy/4cxJl cgkfyWmxbuZXUuYAd6Mop3Lr1UuAKfcmc2uCmyggYRT8nZ1hjg9JQWCkjKvIvog7jpOZ DYimG9IQuNAmrCdBd27pGunKO66j4pYGtHCPZcY2gUybyLo0Q69tAnzi43Qu4TLnl3Fr tovqmfh37sAW1EtidF0axGW0wesa++MnZJhzataBSeLH9bKNss45fbgQc5ZUQswyURAf tM3BkD6065B0YFePxSGNHSV01hsyt5bDp5iYi+dS9ueM+qYNWJv0EcZYBZfItB+E0I7S aC+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=IllaZLXEwEJjDJxtT2WYBPf2Lb3n5lSsab+gvbbmZvE=; b=p9Lplr5cgpQ+gqS9+X7TKIwrCjPA23L8uLJnKj5OdZ3Whr5nRMWYwQBRb65Tbs+LC2 spCC5ebaiq5b8UEv1nJxTWo4GpRIrr6V+eot346ttimo0+MO3gIWN+4Wcb+WVsztiRNn hilPrK290V28Gjdgg0CbDhk3ASPGoWR0jKu7UFVp981Uu9XIgTESFgPHyWW6USvFG954 fZLJfOoQNR+omZeb6CvRgSOQXKhriXrID9BWCmF8HRoxBLbYqXmM/DRYdSqXfNu3a+iE u3Kd2qapDkYFYDQtkVXcuYvur/iNY1jLgn8Zsr7B/M6MeAB+5N5EZgdDBdsXRkjcnSog rdCA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a50c8cb000000b004612915d21bsi12905392edh.276.2022.11.02.06.47.12; Wed, 02 Nov 2022 06:47:35 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230423AbiKBNqr (ORCPT + 99 others); Wed, 2 Nov 2022 09:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbiKBNqp (ORCPT ); Wed, 2 Nov 2022 09:46:45 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EEEB2AE25 for ; Wed, 2 Nov 2022 06:46:41 -0700 (PDT) Received: from mxct.zte.com.cn (unknown [192.168.251.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N2Sq36x3lz5PkGl; Wed, 2 Nov 2022 21:46:39 +0800 (CST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4N2Sq03SQJz4x5TB; Wed, 2 Nov 2022 21:46:36 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.40.52]) by mse-fl2.zte.com.cn with SMTP id 2A2DkUMV086818; Wed, 2 Nov 2022 21:46:30 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 2 Nov 2022 21:46:33 +0800 (CST) Date: Wed, 2 Nov 2022 21:46:33 +0800 (CST) X-Zmail-TransId: 2af9636274b9ffffffffb20f7d44 X-Mailer: Zmail v1.0 Message-ID: <202211022146335400497@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_net=3A_af=5Fkey=3A_remove_redundan?= =?utf-8?q?t_ret_variable?= X-MAIL: mse-fl2.zte.com.cn 2A2DkUMV086818 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 636274BF.001 by FangMail milter! X-FangMail-Envelope: 1667396799/4N2Sq36x3lz5PkGl/636274BF.001/192.168.251.13/[192.168.251.13]/mxct.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636274BF.001/4N2Sq36x3lz5PkGl X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748392325552609452?= X-GMAIL-MSGID: =?utf-8?q?1748392325552609452?= From a09ddf4bd144610fd17bdbf07f0c27700d805e6f Mon Sep 17 00:00:00 2001 From: zhang songyi Date: Wed, 2 Nov 2022 21:05:39 +0800 Subject: [PATCH linux-next] net: af_key: remove redundant ret variable Return value from pfkey_net_init() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- net/key/af_key.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.15.2 diff --git a/net/key/af_key.c b/net/key/af_key.c index 213287814328..ec37825b1c15 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3863,14 +3863,11 @@ static struct xfrm_mgr pfkeyv2_mgr = static int __net_init pfkey_net_init(struct net *net) { struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id); - int rv; INIT_HLIST_HEAD(&net_pfkey->table); atomic_set(&net_pfkey->socks_nr, 0); - rv = pfkey_init_proc(net); - - return rv; + return pfkey_init_proc(net); } static void __net_exit pfkey_net_exit(struct net *net)