Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp656255rdb; Tue, 31 Oct 2023 20:17:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGamSKt2cAfWq/ez9PtZXz3Y4dSYGd2aUbxKqVUnPFYYu2fMrvUFnnHPOzo7tHunRyYmBTV X-Received: by 2002:a17:902:ce8e:b0:1cc:636f:f38a with SMTP id f14-20020a170902ce8e00b001cc636ff38amr4544021plg.57.1698808657863; Tue, 31 Oct 2023 20:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698808657; cv=none; d=google.com; s=arc-20160816; b=nlmVtGkOAMFtxFilO/lEN/j77csYqdFc+ZbAZ+QGKU4hxHsrwHdLs98TS0/jYP4/4u zJ91Zga5t+51RxzNihgx9NllZverKlVGHs37Ke6Jq+4MIrTf15ytTXJntwjHdVsI/Tsv UqnRU2W7ixxwMu5oOhc/PNmd24QYRyPYWyoFvpio8JZBSrkiZOsVvehMtj09bsGT3FQ/ VLA/hnBPBpWp6KSsPU1y3dAz/KzzFxpi3T+zLDtyAqyDqHFYjOv9rAhjogtiTauRrJhX r/8RwMrEvhyhkYQaSK0nCqiO3K/IZel0jCLMvqSEsD6hzfy1qtkhMDXT3WqXMGMMjxOj UxQg== 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=YSoKHgT3Qu4CTMmPpwvjwNbYcNbTwbnQCfAnSCdpHVY=; fh=msWWVIsf5rCgar6bCQE2PGN6pw1Sxcvpc3BdukoH9nM=; b=nAmD3X64212XVWwnts3AxVEvUU+N0Ez8g844qphK8HN1VzLPc1nGn058mgZs088Hev +8NS66VZKxLKW1d2x8woQescLr7arEtsSg4CqpvSJC8bTtEP9jZdFsZntjay3xdS6cXD vIrAdgSJJ9GmerdkqVx7R4/7SLLavWLXgHf2cRw5BZlsgS+hFnUNso6N56edB+mr37fn 0tIWGpszOyqFVrOze1tBIdxytPUc8op2v4tLNih7TdP88TACxwbP0Tq/Ua/eerdKzBd9 fX2bTcldwrjyzUh00ihDanj+Lm5HIvGJ1Dz1Xi4LC2uSc3u4SOuxAGNr9jSq8asLW8+K UoLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n8-20020a170902d2c800b001b8b4330585si2224745plc.510.2023.10.31.20.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 20:17:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4351580BB539; Tue, 31 Oct 2023 20:17:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbjKADRI (ORCPT + 99 others); Tue, 31 Oct 2023 23:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbjKADRG (ORCPT ); Tue, 31 Oct 2023 23:17:06 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id EAAB8B4; Tue, 31 Oct 2023 20:17:02 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 2C6C06051EAB4; Wed, 1 Nov 2023 11:16:59 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: mike.looijmans@topic.nl, mturquette@baylibre.com, sboyd@kernel.org Cc: Su Hui , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2] clk: si5341: fix an error code problem in si5341_output_clk_set_rate Date: Wed, 1 Nov 2023 11:16:36 +0800 Message-Id: <20231101031633.996124-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 31 Oct 2023 20:17:12 -0700 (PDT) regmap_bulk_write() return zero or negative error code, return the value of regmap_bulk_write() rather than '0'. Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver") Acked-by: Mike Looijmans Signed-off-by: Su Hui --- drivers/clk/clk-si5341.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c index 9599857842c7..2920fe2e5e8b 100644 --- a/drivers/clk/clk-si5341.c +++ b/drivers/clk/clk-si5341.c @@ -895,10 +895,8 @@ static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate, r[0] = r_div ? (r_div & 0xff) : 1; r[1] = (r_div >> 8) & 0xff; r[2] = (r_div >> 16) & 0xff; - err = regmap_bulk_write(output->data->regmap, + return regmap_bulk_write(output->data->regmap, SI5341_OUT_R_REG(output), r, 3); - - return 0; } static int si5341_output_reparent(struct clk_si5341_output *output, u8 index) -- 2.30.2