From patchwork Tue Jun 27 19:04:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 112700 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7203706vqr; Sun, 25 Jun 2023 19:36:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TtYPq01VnYP7LIp7ulmCQegDqM/u8U418B9MgknCoIIyG1XTpxxkNVC8kL11ZbM0r0rOA X-Received: by 2002:ad4:5be4:0:b0:632:4666:b237 with SMTP id k4-20020ad45be4000000b006324666b237mr7914022qvc.64.1687746973393; Sun, 25 Jun 2023 19:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687746973; cv=none; d=google.com; s=arc-20160816; b=quXCH+BcMLGN6dZ0OurdfjzrmfuY1eMXCZ0txMABxLXEWygyMJ/U3Zo2+4rpNsqoUk Jbt1qzXsnhG6aD418ZsXG1AfQgV0jk20tXiZOlv6Qcg6fW6weYhBxR0voF8ywv1AEiFC HY02ZzoVRlq8ir9Cd0KVbAhNR8u2NhbR/waLNNo5M9/Kds8GGOr1TsZinqwkF0Xvii1z 1yj4r/9Mg2U8P5YkLnu27jGbNKPKS6nSHG+xts491LaDFoUX598KDU6P1urSVjsqigx4 tO009disaZTZP2CpzYoGauHMdrlKctSfevbJ6aA6/gHFFyCLslV95Rw7LmheuUSz1Kl/ 2D/g== 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=/8mvT5FzjLHZkEoNYQtrSXFl2tkjo6xxn+lthZUCXxw=; fh=fip8QCni6mELf/B4YWXKkGZhc2jaQYUntzphMnxx+pw=; b=jeh0s+UBzHXGGv3KuqdIvMuC3TzQDm0u8ZlWR1bH9wKWdvedaGi5G0o48sut9cUmAF F1cRngxfgL6LcEX0tJ8uyEht/kZTFCYiXXzH8jNiTaOCq99aCqVVn+P+hCPVcj1X7rYc C/jFynsV1lTlGuyxyAFySdZG/3NJ7txXy60v6TgMu2Xc6jX17TuuN6+tKnD8jpMEszsn s8LIB7fTND6ZQwP/xfDBCjrEy/EQa8+Glm+ZUl/3TrNu9onZy8B4xeDZ7iAdHaCw3c6f tFnIvYyEOvst5WNgKg52Cr14qUMI3cEXZyvSJSBqOLDnwWWdkno/WsDB1nuIDDi81+Iw yfbA== 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 u7-20020a17090a3fc700b00262fe18cff3si291998pjm.172.2023.06.25.19.36.01; Sun, 25 Jun 2023 19:36:13 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbjFZCcq (ORCPT + 99 others); Sun, 25 Jun 2023 22:32:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjFZCcp (ORCPT ); Sun, 25 Jun 2023 22:32:45 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4CB8DB1 for ; Sun, 25 Jun 2023 19:32:44 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id B199760671F5C; Mon, 26 Jun 2023 10:32:39 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?time=3A_posix-timers=3A_Remove_unnecessary_?= =?utf-8?q?=E2=80=980=E2=80=99_values_from_error?= Date: Wed, 28 Jun 2023 03:04:00 +0800 Message-Id: <20230627190400.5501-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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?1769730970463294462?= X-GMAIL-MSGID: =?utf-8?q?1769730970463294462?= error is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/time/posix-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 808a247205a9..4e9a1676101b 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -906,7 +906,7 @@ static int do_timer_settime(timer_t timer_id, int tmr_flags, const struct k_clock *kc; struct k_itimer *timr; unsigned long flags; - int error = 0; + int error; if (!timespec64_valid(&new_spec64->it_interval) || !timespec64_valid(&new_spec64->it_value))