From patchwork Fri Dec 23 08:32:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 36160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp206668wrn; Fri, 23 Dec 2022 00:34:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXsq7XZJAJ60JPekw+7OFsCXZ21yt3oXWXNTIkKtkvf7b682BMT3B/sM0ZRSGuIT8UOwYnO6 X-Received: by 2002:a05:6402:36a:b0:46f:7453:dd84 with SMTP id s10-20020a056402036a00b0046f7453dd84mr6887720edw.40.1671784441221; Fri, 23 Dec 2022 00:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671784441; cv=none; d=google.com; s=arc-20160816; b=kHgOeEY15qtPW2erh/P8qrDh7G2hGKuKrCy3ltReIbPIujO6zSI6Qcvfu4ztPf0VVJ tl/AH8kO2Uy9UCWcL2C9Zr9rPmfbNTTsWC7qqsRUism9rS1GM0if1K0WGtZUuiVIm8SY o3i3iqKpkbDHInoLXWbuW2JG/PUI4hciC/+l0NAttq/NJK7AGUbnNpxBiCKxjLr/wOLX XKNzxvEjYEdPmQB+L0qPNCTu3YIsnVX1UrPgYw4RCMv3M9Cv1bchKyYzfK1UK4mugfBk usPNu4mJlh834bu4Z+DV+c07xfcocNTrKwol/4Cj5dkUE6/pY+u3oNCBByJKb/QzXqnk YKqw== 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=Om7lAyJe51KlWYv2jxmShlF3ZwCbxD0bosYJRO/tnbM=; b=F9M1j2WqDynHbx4P7TotzYuvaI/hrjsfT4EJpzK2rhwC79C1n50NHI/9Y0YjNprD3s hEN3vIEsUG5UUJtd1IHJJRwXvjRDDXw2scdGnKoo5YeHI6sK7pt6XprXQvw1G4x0GaKG qnmzUnB5b9Md0spqZs0lnbNS/24viFU1Z7KWWBAa8F0nWcVo1Xhz/BYXCS60n+YUJJhA 37jQblfac6qAntJJjWBoR6yZaBk+n82pAt9yrHAJq6hRjiaSBRklxT2fWEfx8XcDKk/V zWX4s3wDwHx6AGuJgEIM/wT3dK5u94ZysVBrAMkUudY/6SaSSRNvyUXWsBKo6GYuePeu VRBw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q30-20020a50cc9e000000b004604906b23csi2250275edi.545.2022.12.23.00.33.37; Fri, 23 Dec 2022 00:34:01 -0800 (PST) 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 S236088AbiLWIcl (ORCPT + 99 others); Fri, 23 Dec 2022 03:32:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiLWIcj (ORCPT ); Fri, 23 Dec 2022 03:32:39 -0500 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1CBA5FA7; Fri, 23 Dec 2022 00:32:37 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 6541F1E80D9F; Fri, 23 Dec 2022 16:27:27 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lyBlRVQ4w07q; Fri, 23 Dec 2022 16:27:24 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id A0DE41E80D96; Fri, 23 Dec 2022 16:27:24 +0800 (CST) From: Li kunyu To: mcgrof@kernel.org Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?utf-8?q?module=3A_main=3A_remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_err?= Date: Fri, 23 Dec 2022 16:32:32 +0800 Message-Id: <20221223083232.4189-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1752993042325050868?= X-GMAIL-MSGID: =?utf-8?q?1752993042325050868?= err is assigned before use, so it does not need to initialize the assignment. Signed-off-by: Li kunyu --- 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 ff2dfd1f548d..6e6e0428b183 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2669,7 +2669,7 @@ static int load_module(struct load_info *info, const char __user *uargs, int flags) { struct module *mod; - long err = 0; + long err; char *after_dashes; /*