[alsa-devel] [PATCH] ASoC: tpa6130a2: fix volume setting when no stream is running

Mark Brown broonie at kernel.org
Sat Sep 24 20:31:10 CEST 2016


On Thu, Sep 22, 2016 at 01:10:40PM +0300, Nikita Yushchenko wrote:

> -		ret = regulator_disable(data->supply);
> -		if (ret != 0) {
> +		ret2 = regulator_disable(data->supply);
> +		if (ret2 != 0) {
>  			dev_err(data->dev,
> -				"Failed to disable supply: %d\n", ret);
> -			return ret;
> +				"Failed to disable supply: %d\n", ret2);
> +			return ret ? ret : ret2;
>  		}

The ternery operator to save the error handling block is a bit too cute
to be clear, it'd be better to just handle each error directly.  Can you
please send a followup patch fixing this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160924/3d50e623/attachment.sig>


More information about the Alsa-devel mailing list