Re: [PATCH 2/2] ASoC: tegra: probe deferral error reporting

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

 



On Saturday, 21 July 2018 12:56:15 MSK Mark Brown wrote:
> On Fri, Jul 20, 2018 at 12:31:07PM +0000, Marcel Ziswiler wrote:
> > On Fri, 2018-07-20 at 13:16 +0100, Mark Brown wrote:
> > > >  	ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node,
> > > >  	
> > > >  					    "nvidia,codec-sync-
> > > > 
> > > > gpio", 0);
> > > > 
> > > >  	if (!gpio_is_valid(ac97->sync_gpio)) {
> > > > 
> > > > -		dev_err(&pdev->dev, "no codec-sync GPIO
> > > > supplied\n");
> > > > +		ret = ac97->sync_gpio;
> > > > +		dev_err(&pdev->dev, "no codec-sync GPIO supplied:
> > > > %d\n", ret);
> > > > 
> > > >  		goto err_clk_put;
> > > >  	
> > > >  	}
> > > 
> > > This isn't reporting an error code associated with the attempt to
> > > find a
> > > codec-sync GPIO, it's the result of some other operation.
> > 
> > What exactly is then the of_get_named_gpio() above please doing if
> > not getting the codec sync GPIO? I am not following you, sorry.
> 
> It's not in any way involved in setting the value of ret, whatever value
> that has it's nothing to do with that operation.

The comment to gpio_is_valid() says that it "Returns GPIO number to use with 
Linux generic GPIO API, or one of the errno value on the error condition". 
Comment doesn't explicitly states that the returned GPIO number is always 
valid, but it is kinda implied.


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux