Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754105AbcKRUAB (ORCPT ); Fri, 18 Nov 2016 15:00:01 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:33246 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752550AbcKRT76 (ORCPT ); Fri, 18 Nov 2016 14:59:58 -0500 Date: Fri, 18 Nov 2016 11:59:53 -0800 From: Bjorn Andersson To: Sarangdhar Joshi Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Jordan Crouse , Stephen Boyd , Trilok Soni Subject: Re: [PATCH v3 3/3] firmware: qcom: scm: Return PTR_ERR when devm_clk_get fails Message-ID: <20161118195953.GO28340@tuxbot> References: <1479259165-1601-1-git-send-email-spjoshi@codeaurora.org> <1479259165-1601-4-git-send-email-spjoshi@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479259165-1601-4-git-send-email-spjoshi@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 42 On Tue 15 Nov 17:19 PST 2016, Sarangdhar Joshi wrote: > When devm_clk_get fails for core clock, the failure was ignored > and the core_clk was explicitly set to NULL so that other > remaining clocks can be queried. However, now that we have a > cleaner way of expressing the clock dependency, return failure > when devm_clk_get fails for core clock. > > Signed-off-by: Sarangdhar Joshi Acked-by: Bjorn Andersson Regards, Bjorn > --- > drivers/firmware/qcom_scm.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c > index ddf7c8b..0fbf2ea 100644 > --- a/drivers/firmware/qcom_scm.c > +++ b/drivers/firmware/qcom_scm.c > @@ -395,10 +395,10 @@ static int qcom_scm_probe(struct platform_device *pdev) > if (clks & SCM_HAS_CORE_CLK) { > scm->core_clk = devm_clk_get(&pdev->dev, "core"); > if (IS_ERR(scm->core_clk)) { > - if (PTR_ERR(scm->core_clk) == -EPROBE_DEFER) > - return PTR_ERR(scm->core_clk); > - > - scm->core_clk = NULL; > + if (PTR_ERR(scm->core_clk) != -EPROBE_DEFER) > + dev_err(&pdev->dev, > + "failed to acquire core clk\n"); > + return PTR_ERR(scm->core_clk); > } > } > > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >