Hi Tim,
On Thu, Nov 9, 2017 at 4:45 PM, Tim Harvey <[email protected]> wrote:
> +static int tda1997x_set_power(struct tda1997x_state *state, bool on)
> +{
> + int ret = 0;
> +
> + if (on) {
> + ret = regulator_bulk_enable(TDA1997X_NUM_SUPPLIES,
> + state->supplies);
> + msleep(300);
Didn't you miss a 'return ret' here?
Otherwise regulator_bulk_disable() will always be called below.
> + }
> +
> + ret = regulator_bulk_disable(TDA1997X_NUM_SUPPLIES,
> + state->supplies);
> + return ret;
> +}
On Sat, Dec 16, 2017 at 11:32 AM, Fabio Estevam <[email protected]> wrote:
> Hi Tim,
>
> On Thu, Nov 9, 2017 at 4:45 PM, Tim Harvey <[email protected]> wrote:
>
>> +static int tda1997x_set_power(struct tda1997x_state *state, bool on)
>> +{
>> + int ret = 0;
>> +
>> + if (on) {
>> + ret = regulator_bulk_enable(TDA1997X_NUM_SUPPLIES,
>> + state->supplies);
>> + msleep(300);
>
> Didn't you miss a 'return ret' here?
>
> Otherwise regulator_bulk_disable() will always be called below.
>
Fabio,
Yes thanks for catching that. I'll fix in the next revision.
Tim