Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbdI1Pwc (ORCPT ); Thu, 28 Sep 2017 11:52:32 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:50795 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbdI1Pwb (ORCPT ); Thu, 28 Sep 2017 11:52:31 -0400 From: Gregory CLEMENT To: Thomas Petazzoni Cc: Andrew Lunn , Yehuda Yitschak , Marcin Wojtas , Jason Cooper , netdev@vger.kernel.org, Antoine Tenart , Omri Itach , linux-kernel@vger.kernel.org, Nadav Haklai , Shadi Ammouri , Igal Liberman , =?utf-8?Q?Miqu=C3=A8l?= Raynal , Hanna Hawa , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Subject: Re: [PATCH net] net: mvpp2: Fix clock resource by adding an optional bus clock References: <20170928153923.29003-1-gregory.clement@free-electrons.com> <20170928174654.630cfefd@windsurf.lan> Date: Thu, 28 Sep 2017 17:52:19 +0200 In-Reply-To: <20170928174654.630cfefd@windsurf.lan> (Thomas Petazzoni's message of "Thu, 28 Sep 2017 17:46:54 +0200") Message-ID: <87shf6hlcc.fsf@free-electrons.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 47 Hi Thomas, On jeu., sept. 28 2017, Thomas Petazzoni wrote: >> /* List of pointers to port structures */ >> struct mvpp2_port **port_list; >> @@ -7963,6 +7964,16 @@ static int mvpp2_probe(struct platform_device *pdev) >> err = clk_prepare_enable(priv->mg_clk); >> if (err < 0) >> goto err_gop_clk; >> + >> + priv->axi_clk = devm_clk_get(&pdev->dev, "axi_clk"); >> + if (IS_ERR(priv->axi_clk)) { >> + err = PTR_ERR(priv->axi_clk); >> + priv->axi_clk = NULL; > > You should handle -EPROBE_DEFER here. Indeed, if we have -EPROBE_DEFER, > we shouldn't treat it as "the clock doesn't exist, so let's skip it and > continue", but rather as "the clock exists, but isn't ready to use yet, > let's try later". You're totally right, I will send a v2 (I will also fix the other issue you spotted). Thanks, Gregory > > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com