lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191206103453.GC10451@ediswmail.ad.cirrus.com>
Date:   Fri, 6 Dec 2019 10:34:53 +0000
From:   Charles Keepax <ckeepax@...nsource.cirrus.com>
To:     Chuhong Yuan <hslester96@...il.com>
CC:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, <patches@...nsource.cirrus.com>,
        <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: wm5100: add missed regulator_bulk_disable

On Fri, Dec 06, 2019 at 03:53:00PM +0800, Chuhong Yuan wrote:
> The driver forgets to call regulator_bulk_disable() in remove like that
> in probe failure.
> Add the missed call to fix it.
> 
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>  sound/soc/codecs/wm5100.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
> index 91cc63c5a51f..d985b2061169 100644
> --- a/sound/soc/codecs/wm5100.c
> +++ b/sound/soc/codecs/wm5100.c
> @@ -2653,6 +2653,8 @@ static int wm5100_i2c_remove(struct i2c_client *i2c)
>  		gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
>  		gpio_free(wm5100->pdata.ldo_ena);
>  	}
> +	regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
> +			       wm5100->core_supplies);
>  

This is a bit trickier than this since these regulators are being
controlled by PM runtime, and it doesn't necessarily leave things
in an enabled state when it is disabled.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ