Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15520193rwd; Sun, 25 Jun 2023 19:39:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JGh1fk/gku44oBtGHL4AYJ2HBvpS0WIzxO6NrKOsasBDLFBuwhKRIM1DFa/Y4BXOXOMsy X-Received: by 2002:a05:6358:511e:b0:134:c279:c825 with SMTP id 30-20020a056358511e00b00134c279c825mr344791rwi.12.1687747159442; Sun, 25 Jun 2023 19:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687747159; cv=none; d=google.com; s=arc-20160816; b=TC1WqYobLbOZczrK5Gch7fC+MDwGV0gzE8Lpwq3bMPuMwNWcTFPrEYEh2fZkd2D5YF d4an/gCGs3kWT38PYFgiXdvnRWdcBuTia0yFVEgSJv8pmEyeLco1zfwYbKbqqlb0oi9D RFTgQKbsdppc2mtv6acf/nZC4d2zW9vDuiEIZrfApKydnylXlETHjIifjj3kSPce9qgd 8MnrTZJqfa2e8d3R2cNg2iWDaXywjNWYSEAZEoIC/GqA4pYI4dzdv8LrtiE/A/j8r6bU 1nszPoDvenBNHxy+31ghqTWpfxfQW8eJjNdZvsBYrB/ZTIp3EkJ2/RAr8BuYTmhP/4Jj APtg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a63f010000000b00543c1b205a5si4367734pgh.149.2023.06.25.19.39.08; Sun, 25 Jun 2023 19:39:19 -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 S230040AbjFZByb (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:=20ntp:=20Remove=20unnecessary=20=E2=80=98?= =?UTF-8?q?-ENODEV=E2=80=99=20values=20from=20err?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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) -- 2.18.2