[alsa-devel] [PATCH] ASoC: mxs-saif: Use a signed integer for error value

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jan 8 13:33:23 CET 2013


On Tue, Jan 08, 2013 at 10:27:13AM -0200, Fabio Estevam wrote:

> -	saif->id = of_alias_get_id(np, "saif");
> -	if (saif->id < 0)
> -		return saif->id;
> +	ret = of_alias_get_id(np, "saif");
> +	if (ret < 0)
> +		return ret;

Why not remove said->id completely if we don't need to store a value
there?  Alternatively, this needs to store the id if the return value is
OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130108/8498fe7d/attachment.sig>


More information about the Alsa-devel mailing list