From patchwork Tue Jun 27 18:25:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 112697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7199963vqr; Sun, 25 Jun 2023 19:23:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50iOET410JerOnE/0o456i4sxlDs1RClFvydZWNWdqSHgi6nvgJRYYfdQ3m/02pMJi0uWt X-Received: by 2002:aa7:cd6a:0:b0:51d:9df7:72d1 with SMTP id ca10-20020aa7cd6a000000b0051d9df772d1mr169005edb.37.1687746206361; Sun, 25 Jun 2023 19:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687746206; cv=none; d=google.com; s=arc-20160816; b=OonI0QcCGsqIhK63JSJGvJMmCFlVCTmRIByd/+uYA1mi7ImhW6RpTjD9d9Tl53W8R1 FE6/D9d/Z8sqB8YRPbNAi72UD1mXA/LnPiRj0qM4JfIeL5UnrvJgPr3noappYBXx4P8i o80Zmnv/VOo3UIOzEA1KG0Z0Ts3GUjoGjcF/lAk/+N0tSUSEYaHZeP+LHzB5utALSI/V jlmqsMAi9aYUGS2XVjwutvAXUzGgMJOLTnfKGz1cqHjhl9VWn6ONXI5clIqBbn9dx44K /zv3jTCV1L/CFYcVOfqsn+Blr3tbFBdg/Kz/rvLPHr6ph0Ww3/a23schJlSGCglLj0fl c/vw== 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=I1b6ojydnvfNM96Q9372dz9S/6S9kCAzDL1KStIXrgw=; fh=qA8N7nPiaDrmclPtyxVvkizFKMrMx1CcLzlWO+U72mo=; b=xmBQy8oRveJUbiYVhBWvvojVfX4UA97gyP0AxiVMOGYKhqHXMbbcXE3QNRYWv6pw8N 1W90CB4eFBYvSSFSEz0S38XqxrWwkTvjfqk8xG2ODl0/LaGEgBUHTDZksIJG53Z68lvv YyYIfKLT4VvQEf/uPpuOaStgE+ATXi1pFCmBmnWPwDO2nbHOZQCs26QFLdySQgYG27D1 G0X1pue28r/sqoUPWGTiuLPrlNHV298RRRuplOHBSlcqej042164J36AFsAlR2/gQqzn 7Miez2imviV2ZWWU80Fz4Lyp90/nlh6IW3vmpfWL6CyeKrD2+vwlWLjPdd9wcHu2nr24 dRJA== 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 f5-20020a056402150500b0051d9376c051si1247406edw.252.2023.06.25.19.22.54; Sun, 25 Jun 2023 19:23:26 -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 S229452AbjFZByb (ORCPT + 99 others); Sun, 25 Jun 2023 21:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjFZBya (ORCPT ); Sun, 25 Jun 2023 21:54:30 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 7575A196 for ; Sun, 25 Jun 2023 18:54:28 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 14E0B606536B5; Mon, 26 Jun 2023 09:54:20 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?time=3A_ntp=3A_Remove_unnecessary_=E2=80=98-ENODE?= =?utf-8?q?V=E2=80=99_values_from_err?= Date: Wed, 28 Jun 2023 02:25:40 +0800 Message-Id: <20230627182540.5243-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?1769730166346151892?= X-GMAIL-MSGID: =?utf-8?q?1769730166346151892?= err is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/time/ntp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 406dccb79c2b..3808bbf4db0c 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -582,7 +582,7 @@ static int update_rtc(struct timespec64 *to_set, unsigned long *offset_nsec) { struct rtc_device *rtc; struct rtc_time tm; - int err = -ENODEV; + int err; rtc = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE); if (!rtc)