Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp772350rdb; Tue, 5 Dec 2023 22:11:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR/yP5eqHOo3StSFxTwTUv7sdf3GNU27xB3ZR5PlSvcWP1IplZi4B3ux+e+GNhtPdE193A X-Received: by 2002:a17:902:c950:b0:1d0:af28:4603 with SMTP id i16-20020a170902c95000b001d0af284603mr476636pla.32.1701843089134; Tue, 05 Dec 2023 22:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701843089; cv=none; d=google.com; s=arc-20160816; b=c1tHyBvOQoZjKBQ0VJE+bx8yoqGcTBloWZGPE1T0YitWpCkNdqPQn1p17i5ygI7UBp NvH4FjkW9sCkdsf2H3pqJsSIRvM9wy/K35U+gOf3Ob0TfhGdjtPVH/YfV/4tmtqUCc4f BvEheL4dkGHauOEJ9xrkqArYUSFbyf4woAfOp6mrN4+sYyg0iBp2KOBOzg12Bw75BdKp imRCAhgEnVKJhzmZsiABAf2xDXpA/WskZSVnZOqrIn//gyqK+FSx7wVOFSrZ0tfW32Td rZ2tIMI0FmI/HzklYzDSJYEgfwTQgeY25x8hcVA1FnfLMY6mA+9Jb0+EtOmbarz+e+Oz 6ACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LKYZoWEFRs5dUVHYwgV/qy/EKtszPIUY4QdRgNvnJVU=; fh=h+yg2dPpPYaJYsvr/9IHzTn6rIR+8wTzz5T/ky46U1o=; b=gHsOUw+3bytY5MRCNOqk6er7l0Vsnucvm6/LlUn+cOmpPRWUPpzSrBY0K1W4We2fX3 gSQB+nrXqOXSCFPhCEdxJVAfrJEWqSp3BP6oxHfsArK0uWx5dlbYrkPQcDyfdcm5MIy9 j+NeamE5k1aOgPYonqCsW6yKCdiuYc0GvVqddQ8Qd5GM9kC7p7e2rtL7pJ9T0DuvkGZ5 /1ofBG714rnSJ6jkWNfGkHP5uERSmePxaBNnb4q3T/W1rpC1PzcS1GkFKJ+vURM91Byg J1rOWErw2UK2gTTow7ISjhqeHGAf95PPTpugjZeJfLfGxzhutIpmQJ3KmNbpI3SN2vY4 yCEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T1GRMpKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id jk17-20020a170903331100b001d055315494si8455479plb.540.2023.12.05.22.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:11:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T1GRMpKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9EFDA819D9F7; Tue, 5 Dec 2023 22:11:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376917AbjLFGLL (ORCPT + 99 others); Wed, 6 Dec 2023 01:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376890AbjLFGLJ (ORCPT ); Wed, 6 Dec 2023 01:11:09 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9378C1BD for ; Tue, 5 Dec 2023 22:11:15 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1d0b0334ffcso23563725ad.1 for ; Tue, 05 Dec 2023 22:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701843075; x=1702447875; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LKYZoWEFRs5dUVHYwgV/qy/EKtszPIUY4QdRgNvnJVU=; b=T1GRMpKojs0Dl4SDXSY3bYlk2QcssiMWR4Gx8x+SlVlehoejrOU8X/7c3pXEu4e1Cc wNlCnEOGkn4r0iWrZWnj5PWZO/97jC55fTflOC9bF0dnAs/dyi+uoKK6nm4oxApebsmK aemj1c1dlL4vtd+Bt7hEH/Z9UnbVCQOvBqXd96+kKsQUC2EdVNOYunCvXpL3D1F2eHN8 qA+ZSKe4cs/3c/kbQie3jvHZgWZJSuLtRyzRSjDFDW/05y0yPvxKL+e7wYx03uFaY9qK fypDlh3v3RGff5pnPH+VZCRLCMwp0DmQTMMaRbJDcBIb3oAc24CgZzIuqZnU7faEA5s9 g45Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701843075; x=1702447875; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LKYZoWEFRs5dUVHYwgV/qy/EKtszPIUY4QdRgNvnJVU=; b=YOY4K+DGgWWfmy7HkmA0u0Ulb93VeoJrbaz13WoJpfqKoJMRb/ByF8NHjW7Fdt6Ird 7i3fnxyX3dPuQ3oZxtkdZWhQ9/oWUuGCAd+D2/e0HrQoRSnmtAAk8Duv8lrI4OFJmitr A6VSZRJN9cWF5CZC+iLKtM17QEjw6TqNH3QXVF1swhIT+EzlS9y1Elu23zmuJX9bySKs +6FDevTaXSDkzhZRZUOB+WyYw/68y6KmO5TduiL2RFw/gAjZIzv5FrxedPpwAasu0ffQ ofjZDDjIo2Py1tdwa5o6cGrLDz+CjyJ++OTd7H/RJgOfHuHLs89kKqwOMzlo0aRxgR8s eKSA== X-Gm-Message-State: AOJu0YymqrV8cYjGEvjymCOy3O4oEezxabH7nZHlKMce5EL0e9VPiKui zf1/RVg+tmnkcINmJIEy8jW0Zw== X-Received: by 2002:a17:903:18a:b0:1d0:969b:4c0b with SMTP id z10-20020a170903018a00b001d0969b4c0bmr445601plg.101.1701843074923; Tue, 05 Dec 2023 22:11:14 -0800 (PST) Received: from localhost ([122.172.82.6]) by smtp.gmail.com with ESMTPSA id l7-20020a170902f68700b001cc2ebd2c2csm8512372plg.256.2023.12.05.22.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:11:14 -0800 (PST) Date: Wed, 6 Dec 2023 11:41:11 +0530 From: Viresh Kumar To: Alexandra Diupina Cc: Sudeep Holla , Cristian Marussi , "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH v2] cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() Message-ID: <20231206061111.yim5ahpwdovirtzu@vireshk-i7> References: <2e919694-e124-4864-aa02-01d47495032b@wanadoo.fr> <20231205151220.18463-1-adiupina@astralinux.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205151220.18463-1-adiupina@astralinux.ru> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 22:11:26 -0800 (PST) On 05-12-23, 18:12, Alexandra Diupina wrote: > 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 > --- > v2: replace dev_err() with dev_err_probe() as > Christophe JAILLET suggested > drivers/cpufreq/scmi-cpufreq.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index c8a7ccc42c16..4ee23f4ebf4a 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -334,8 +334,11 @@ 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) > + return dev_err_probe(dev, ret, "%s: registering clock provider failed\n", __func__); > + } > #endif > > ret = cpufreq_register_driver(&scmi_cpufreq_driver); Applied. Thanks. -- viresh