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: 13080729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15BCDC4332F for ; Fri, 23 Dec 2022 08:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235669AbiLWIck (ORCPT ); Fri, 23 Dec 2022 03:32:40 -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 Precedence: bulk List-ID: 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; /*