Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1016405rdb; Fri, 17 Nov 2023 23:01:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAa6G72/HtFdq9kNcntRKr54RRnDSrGJqUEwSEBjhQdDiYkceMqbughCnEefNcH+tXnd9+ X-Received: by 2002:a05:6a20:9387:b0:13f:b028:7892 with SMTP id x7-20020a056a20938700b0013fb0287892mr1565928pzh.2.1700290880078; Fri, 17 Nov 2023 23:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700290880; cv=none; d=google.com; s=arc-20160816; b=sxeLD8TpXX1cnMivduLJldTq2X6Qa8a7E9ohXiMIF00YvWFpcOZVId0GajnMm6HqG4 pMYDtdwZibyZnT7+octMW36O/VusJWWkfHkg6S5QGmfFKFGf8DPPRv/AGoQX8u6qu5vb TcWlOi4XpvH9Jwb1WPapDywEls0UYPcp09iWURiSQQc0jLoArDK/F9tFeBrzsWmGG+XZ otQoVH7SVqOKJQZOgH+mdRKmtwYfm4eswVkhFPA5cghDD/qDd4O7X0JBoNDr7XSg/g7k 0Aedg7ZydWfAQlpkH5GOoAfl/DoRpMNrUgcLhXe2w5ERlYV696+3P4Z78McY9Ira9hyD Gzww== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ImfOXGXy4cC/EU6Ogokf0M7lLV+mAmE9eifGpialzMY=; fh=nJqOrqxIYj/3K+q/DMVbD0fD11uMekmBZCm/VWOUb/Y=; b=RgIyHjLc0kY6YhdAJ3Gs5IvQmKCGfakJpYp6huSUsIqphfjyzJqVER0i1Y9S0Poh60 33r/I8PuUiuvCgc9HLyurYc2vMdev5fDp+SWumgmBUeI7DNxt/HnuUrZ2HP0iTJ5quSN FUEaMBr+WTMH8AUQgTk1/jnrKBdiCnuX1w4Jo3Z4bmqiCyRTS3Lg6v4CPtyLORCHgN7q O8irmyGxhyGPll2//XZxl574ZA2XTXJxzdbkYDIU5HbyNHi8L3E0psL/fsYXbN3ENRax yhO+RTXv3V1KLq2B8D3lp9idwNvjSGNkXHjmrIKWVXw27Kyi767t8i0iuU4B0819Osyq yY9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=b4WS4N4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o12-20020a170902bccc00b001cc1eab0fe4si3450907pls.298.2023.11.17.23.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 23:01:20 -0800 (PST) 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; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=b4WS4N4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B9C9C809F38B; Fri, 17 Nov 2023 23:00:57 -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 S230241AbjKRHAs (ORCPT + 99 others); Sat, 18 Nov 2023 02:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbjKRHAq (ORCPT ); Sat, 18 Nov 2023 02:00:46 -0500 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A993D7A for ; Fri, 17 Nov 2023 23:00:41 -0800 (PST) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4FJcrhCyonYhw4FJdrn5OM; Sat, 18 Nov 2023 08:00:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700290838; bh=ImfOXGXy4cC/EU6Ogokf0M7lLV+mAmE9eifGpialzMY=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=b4WS4N4xMKW5QDWhALBbAWJK2NO1GAoPH9IbyTN60cNre0mnNzIhRXiqZ78AlKOfo AIuQvUR+JuUI9rucUY/EK/zYlmhHTHH/ELLGTlC1Jy2xNTIDXiGYxve2FKumxmrGyX 5JfTcFGsPW4bsTcuuXe+n1Gx4vknfP3MWTzjKQWGb77hrKETcLHxiOXW4IpefdSYs/ ttmRjhUnBgfx9N6TvGfJHCIbERdLbe5664ZsVIkNwtHC47R+hs6WPxgfCU4V+UY/ea NO+VQr2VLIkWicewXCpwB14gJgzgYPcgB/sc6elHnohZtm2mz1so0mOPEAMOfc3tUW e6oiEKtfXpEAQ== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 18 Nov 2023 08:00:38 +0100 X-ME-IP: 86.243.2.178 Message-ID: <2e919694-e124-4864-aa02-01d47495032b@wanadoo.fr> Date: Sat, 18 Nov 2023 08:00:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() To: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGA0LAg0JTRjtC/0LjQvdCw?= , 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> Content-Language: fr, en-GB From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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]); Fri, 17 Nov 2023 23:00:57 -0800 (PST) Le 17/11/2023 à 12:14, Александра Дюпина a écrit : > 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;" This is a probe function. So, maybe using dev_err_probe() would be slightly nicer? If yes, the dev_err() that is already there could be updated as well in an other patch. CJ > > 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 >