Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp69449rwe; Tue, 30 Aug 2022 21:20:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7U+bbqJVxqgsPtZh1/AykJ+Ow6RjaYbU2+GHProNPiazUU8O9mvl5ze62kIOBlOe1zSOZ2 X-Received: by 2002:a05:6402:5242:b0:448:6849:7e1e with SMTP id t2-20020a056402524200b0044868497e1emr11435720edd.137.1661919604634; Tue, 30 Aug 2022 21:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661919604; cv=none; d=google.com; s=arc-20160816; b=w9QuYmLIJrzrYSNlywo7qsiHoLBbDU4kJ3lwENSnojX4k8lvw+i+oc1nGbyQkEYDSH 8s8QhTPkON9G/OmrR5cUSrO0zGENBiV3vgKDOtqyyW3GGaA2Vk535vbkHpN4vxVMf1CO pfA/mAze2qcRTZdHkDRcyhphnUez+gmkrar7Q8XCglsxYlR3KPGtlp6w8tPj1b5hVr7W cvH25otsJkIJnf6JUcqhR2ZLci5DGOpZ4lY1fGUMH9h2T0JLIsgPRJoEUvtbb8RztDRC i/s/qMe/KTS9IPqTQgcE5Z0mb/sS4JSW52hT8BZcMLU19VZFvILn4XaMREzLqZWp1aAK zwQA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=45PPdY1evLlqKZIxbxdfjEnULWRegD6/68PfXbim370=; b=jd7yV72zeXNKg2pDUArCzoYEkubhc0g/rb1lzfR3CvWkXN4hGX2dVDGyWpP/i4fHyf GiYRjY2B6lS9TJUbPoNrcSLtOEilhg3yPI4WLZ+oAHgfqB1M1X0trzPNHK9ueOA0sM39 vS9Fke5hm8iGyj9AD3XNejY/BN0kgWy19/Gr+Hf8drtKgkIXH1iB3jmX4WjBdk81U7nr K4fpWE+KBqCtRWNWYb64Vpsbd+uK5Da7LrFJGyspU0lWd0poTNh6kjdWS/wBNwypmXHt b5G5XdMHnt6+Gt+stcHz90RU1ojA9woDex4HWAVN2ySqeedWOLYOEPqAPuSTTEUq3Mnn bWJw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa18-20020a170907869200b007303646197csi11508822ejc.596.2022.08.30.21.19.39; Tue, 30 Aug 2022 21:20:04 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231470AbiHaEKT (ORCPT + 99 others); Wed, 31 Aug 2022 00:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230152AbiHaEKP (ORCPT ); Wed, 31 Aug 2022 00:10:15 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48B4842ACB; Tue, 30 Aug 2022 21:10:12 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MHVwb4Lnpz1N7hq; Wed, 31 Aug 2022 12:06:23 +0800 (CST) Received: from ubuntu-82.huawei.com (10.175.104.82) by canpemm500006.china.huawei.com (7.192.105.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 31 Aug 2022 12:10:02 +0800 From: Ziyang Xuan To: , , , , , CC: Subject: [PATCH next-next 1/2] net: vlan: remove unnecessary err variable in vlan_init_net() Date: Wed, 31 Aug 2022 12:09:56 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.82] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Return vlan_init_net() directly in vlan_init_net(), remove unnecessary err variable. Thus code looks more concise. Signed-off-by: Ziyang Xuan --- net/8021q/vlan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index e40aa3e3641c..aaef80fdd852 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -658,13 +658,10 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) static int __net_init vlan_init_net(struct net *net) { struct vlan_net *vn = net_generic(net, vlan_net_id); - int err; vn->name_type = VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD; - err = vlan_proc_init(net); - - return err; + return vlan_proc_init(net); } static void __net_exit vlan_exit_net(struct net *net) -- 2.25.1