Re: [PATCH] ASoC: rsnd: adg: clearly handle clock error / NULL case

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

 



Hi Dan

Thank you for your feedback

> > @@ -430,9 +430,9 @@ static int rsnd_adg_get_clkin(struct rsnd_priv *priv)
> >  	for (i = 0; i < CLKMAX; i++) {
> >  		clk = devm_clk_get(dev, clk_name[i]);
> >  
> > -		if (IS_ERR(clk))
> > +		if (IS_ERR_OR_NULL(clk))
> >  			clk = rsnd_adg_null_clk_get(priv);
> > -		if (IS_ERR(clk))
> > +		if (IS_ERR_OR_NULL(clk))
> 
> "clk" can't be NULL here, right?  So this should just be:
> 
> 	if (IS_ERR(clk))

clk_register_fixed_rate() might return NULL ?
I'm not sure detail.
It is indicating that "error / NULL are both error on this driver".

> (because when a function returns NULL it shouldn't print an error)

It is "from clk framework point of view" right ?
This driver doesn't assume "NULL clk" for any case.

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux