Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp436105rdb; Fri, 17 Nov 2023 03:14:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmmCZX7nU+3W11cHo08exlZUOOGqMBYH2rDOQZ+9ASuL22EaurEWeZFz1MJmzQeYENtcOV X-Received: by 2002:a05:6808:1413:b0:3b2:dc66:1673 with SMTP id w19-20020a056808141300b003b2dc661673mr25206003oiv.9.1700219687050; Fri, 17 Nov 2023 03:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700219687; cv=none; d=google.com; s=arc-20160816; b=rxhQLXdCx6NB7L3izAdBI1z2SBXcmOTvuJIyF/Rdj21ENf+oL4Z8ltRIikJMuwhZQR o+tYnCD11eVVjOXmqQ6jq4HcCaVjkgeuIyvF1VZJjLfKlegJuwDEbXn3dvakMAUqYcLn K1YIHxEs0wSxdFZh4bcyHaoNtJSOp4KaQxZm+aydVpCIt13nZeBwlPkf41ax+CXg/zG1 a6kRgXoR+icOSU1lysY/tmyiDT8KF9Zb6wQ0AT14NvxXPYMaK70bn6t7Nrjrigsbdx5n Gdd3RNE/pMV91H1EUPgLBqt6EpN+Z2PGTdDzbUZsAqjjwzusxztPSQ+AuTLy/S+dFqaY xIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=KAER9kNQxXmH46wGDFJdgQ4KLKBqDW4pRMBlmO1JGs8=; fh=nPnGulUR7gEXDlKBNb1SSj9l0KaveRIbExjR3WZCP4k=; b=DoSoqTeuGcRo3q1Nblilce1R5wDNQtOxHaCI5ZlQx5Gj4DKMwrq+nUiAeRpiuUd1Mt 15DwQmuRgoqNcOZ9Gn9JMvzx41VvQWPtvo46H9d9hj2Rl/xcID7f32DkMp11eHrGOjxr Ikv4evjrw8sFsEc1rW/LOwn9OxhnItbAOz9gxkiQUE848Rk15NgWckzL7lgWSbACEruM Bmu5h84drrmLo8wqJz+S/CFzqEKscI9cbiFVFqToYG6vMHJBrR5VEa/Mc1JNstuEJHMZ LfLYnnBGjOHpHku7wIFnC4/H7uXFwcnVQF+c7mrmIIVn3zq7oasGmcGajy5NLUEbUeEv 0phw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id m15-20020a656a0f000000b005bd39fc1ebesi1839359pgu.223.2023.11.17.03.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 03:14:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 5B897829D9B3; Fri, 17 Nov 2023 03:14:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjKQLOc convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 Nov 2023 06:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKQLOb (ORCPT ); Fri, 17 Nov 2023 06:14:31 -0500 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D04311F; Fri, 17 Nov 2023 03:14:25 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 4136F1864DDA; Fri, 17 Nov 2023 14:14:22 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dJQkUJDBA1fT; Fri, 17 Nov 2023 14:14:21 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id E0BA01866239; Fri, 17 Nov 2023 14:14:21 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fWXtdPalOdLf; Fri, 17 Nov 2023 14:14:21 +0300 (MSK) Received: from new-mail.astralinux.ru (unknown [10.177.185.103]) by mail.astralinux.ru (Postfix) with ESMTPS id 76A4918658FC; Fri, 17 Nov 2023 14:14:21 +0300 (MSK) Received: from [10.177.232.129] (unknown [10.177.232.129]) by new-mail.astralinux.ru (Postfix) with ESMTPA id 4SWvRw6K5nzhXb7; Fri, 17 Nov 2023 14:14:20 +0300 (MSK) Message-ID: Date: Fri, 17 Nov 2023 14:14:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() Content-Language: en-US To: Sudeep Holla Cc: Cristian Marussi , "Rafael J. Wysocki" , Viresh Kumar , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20231117074911.14427-1-adiupina@astralinux.ru> From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGA0LAg0JTRjtC/0LjQvdCw?= In-Reply-To: <20231117074911.14427-1-adiupina@astralinux.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-4.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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]); Fri, 17 Nov 2023 03:14:44 -0800 (PST) I'm sorry, I forgot to add "return ret;" after calling the dev_err() function. Before I post the second version of the patch, please let me know what you think about this fix, keeping in mind what I wanted to add "return ret;" 17.11.2023 10:49, Alexandra Diupina пишет: > devm_of_clk_add_hw_provider() may return an errno, so > add a return value check > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider") > Signed-off-by: Alexandra Diupina > --- > drivers/cpufreq/scmi-cpufreq.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index c8a7ccc42c16..4037945663bf 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -334,8 +334,13 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev) > > #ifdef CONFIG_COMMON_CLK > /* dummy clock provider as needed by OPP if clocks property is used */ > - if (of_property_present(dev->of_node, "#clock-cells")) > - devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL); > + if (of_property_present(dev->of_node, "#clock-cells")) { > + ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL); > + if (ret) { > + dev_err(dev, "%s: registering clock provider failed, err: %d\n", > + __func__, ret); > + } > + } > #endif > > ret = cpufreq_register_driver(&scmi_cpufreq_driver); Regards, Alexandra Diupina