[v2] clk: tegra: probe deferral error reporting
diff mbox series

Message ID 20180814091805.1363-1-marcel@ziswiler.com
State New
Headers show
Series
  • [v2] clk: tegra: probe deferral error reporting
Related show

Commit Message

Marcel Ziswiler Aug. 14, 2018, 9:18 a.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Actually report the error code from devm_regulator_get() which may as
well just be a probe deferral.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2:
- Silence probe deferral as discussed between Peter, Stefan and Stephen.
- Fix line over 80 characters as reported by checkpatch.

 drivers/clk/tegra/clk-dfll.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Stefan Agner Aug. 18, 2018, 12:45 p.m. UTC | #1
On 14.08.2018 11:18, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> Actually report the error code from devm_regulator_get() which may as
> well just be a probe deferral.
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Reviewed-by: Stefan Agner <stefan@agner.ch>

> 
> ---
> 
> Changes in v2:
> - Silence probe deferral as discussed between Peter, Stefan and Stephen.
> - Fix line over 80 characters as reported by checkpatch.
> 
>  drivers/clk/tegra/clk-dfll.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 48ee43734e05..ebb0e1b6bf01 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
> @@ -1609,8 +1609,12 @@ int tegra_dfll_register(struct platform_device *pdev,
>  
>  	td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
>  	if (IS_ERR(td->vdd_reg)) {
> -		dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
> -		return PTR_ERR(td->vdd_reg);
> +		ret = PTR_ERR(td->vdd_reg);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n",
> +				ret);
> +
> +		return ret;
>  	}
>  
>  	td->dvco_rst = devm_reset_control_get(td->dev, "dvco");
Stephen Boyd Oct. 16, 2018, 10:30 p.m. UTC | #2
Quoting Marcel Ziswiler (2018-08-14 02:18:05)
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> Actually report the error code from devm_regulator_get() which may as
> well just be a probe deferral.
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---

Applied to clk-next

Patch
diff mbox series

diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
index 48ee43734e05..ebb0e1b6bf01 100644
--- a/drivers/clk/tegra/clk-dfll.c
+++ b/drivers/clk/tegra/clk-dfll.c
@@ -1609,8 +1609,12 @@  int tegra_dfll_register(struct platform_device *pdev,
 
 	td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
 	if (IS_ERR(td->vdd_reg)) {
-		dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
-		return PTR_ERR(td->vdd_reg);
+		ret = PTR_ERR(td->vdd_reg);
+		if (ret != -EPROBE_DEFER)
+			dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n",
+				ret);
+
+		return ret;
 	}
 
 	td->dvco_rst = devm_reset_control_get(td->dev, "dvco");