Re: [PATCH] ASoC: tpa6130a2: fix volume setting when no stream is running

From: Mark Brown
Date: Sun Sep 25 2016 - 02:03:37 EST


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?

Attachment: signature.asc
Description: PGP signature