Re: [PATCH] i2c: tegra: Avoid error message on deferred probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 27, 2019 at 12:29:39PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
> 
> If the driver defers probe because of a missing clock, avoid outputting
> an error message. The clock will show up eventually.
> 
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Hi Wolfram,

any comments on this patch or is it good to go?

Thanks,
Thierry

> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index ebaa78d17d6e..6bfd5297f425 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -1517,7 +1517,9 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>  
>  	div_clk = devm_clk_get(&pdev->dev, "div-clk");
>  	if (IS_ERR(div_clk)) {
> -		dev_err(&pdev->dev, "missing controller clock\n");
> +		if (PTR_ERR(div_clk) != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "missing controller clock\n");
> +
>  		return PTR_ERR(div_clk);
>  	}
>  
> -- 
> 2.21.0
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux