Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp867299rdb; Fri, 20 Oct 2023 01:28:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7cQz8eCDBpB5yA7KtEZZksJ4r1s0cAedcexp7DxZOxQv33vjVvA9SqilyYYzhFvAoGo3T X-Received: by 2002:a17:903:2344:b0:1ca:87c9:d4e9 with SMTP id c4-20020a170903234400b001ca87c9d4e9mr1274302plh.16.1697790481658; Fri, 20 Oct 2023 01:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697790481; cv=none; d=google.com; s=arc-20160816; b=FIcgA/s5o6IPG+H07v6QN8dEmYwyxH5YRANL7L+o+hUrZL8EtQJPlIVrlWoZyPh3/J mlsBplNSd4fdKdYPYnwVSQ9Iwm2L5H+6R6lNdu8eZQhiCAVVBSGPgtJg+mTM7PlUwDAX FMINHW7BabsZ3r4fpO9FMCjQAtirEXO1TvLIS65IT2AreKiF44wioS3vx5hzPfAAV7pH mRAuBES2ugC19WRV7ayc/4e/5tv9rBwfSn8B+KlQGHl6KuqXYrBwnqHDyK7Um/xpQyU2 nvYv3I5w+bMRAhOQavHvtE527po3sDtxikaqiSs2TicV7TAo1LQ5Ac0xe4Eo3Fafa0yG xfTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=zpwYftXKoJSxvo0KKDUfLc5nuQouIg0XZ6pv2XdZFoE=; fh=Nxti9nkjkWXYTgwh8lJdCqhJ6no6VxTwLbgViBtPAxg=; b=J35OxTTAVD2GAOuVEa+Xv+H/XW8ifWE4GDBoIqXupHpz1naXNXXqssNpO4sQSA5FbZ w1Ec01STJNitEnDZgYAEPLysITFnV70Mm1P1seJI0nm29h9U4CLp4Ds8BUyFQyYiKtr8 RvzlO8eZ2TTZCLERu4MY2R+1J1FecI1NJirLSLmwOGLmHWLd6cJ98aDANYV0uTu5TEtA rLqgQKgTme/2OlDn1vTdoNUl6YPHYz/uQA40iUYG0Md3baNePs8z4bp7ArVO780bDKEZ fEOjulSkmWpib5U4Oy+dQ89oPtt4ztM2PL1D/+dJtXhXXckQo3n9jNta0ixZgjffH6+s 8gEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id i8-20020a170902c94800b001bbacfdad2fsi1376227pla.291.2023.10.20.01.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 01:28:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2DB99826FAA6; Fri, 20 Oct 2023 01:27:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376460AbjJTI1s (ORCPT + 99 others); Fri, 20 Oct 2023 04:27:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376440AbjJTI1r (ORCPT ); Fri, 20 Oct 2023 04:27:47 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 93682C0; Fri, 20 Oct 2023 01:27:44 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 7861260327055; Fri, 20 Oct 2023 16:27:35 +0800 (CST) X-MD-Sfrom: zhoujie@nfschina.com X-MD-SrcIP: 219.141.250.2 From: ZhouJie To: mcgrof@kernel.org Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, ZhouJie Subject: [PATCH] =?UTF-8?q?module:=20main:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20err?= Date: Fri, 20 Oct 2023 16:27:27 +0800 Message-Id: <20231020082727.10659-1-zhoujie@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 01:27:59 -0700 (PDT) Remove redundant assignment .The variable 'err' was assigned a value before its usage, making the initial assignment unnecessary. This commit removes the redundant assignment, improving code clarity and efficiency. Signed-off-by: ZhouJie --- kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 98fedfdb8db52..a3c036eb7bcdb 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2830,7 +2830,7 @@ static int load_module(struct load_info *info, const char __user *uargs, { struct module *mod; bool module_allocated = false; - long err = 0; + long err; char *after_dashes; /* -- 2.18.2