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]
Date:	Wed, 08 Aug 2012 00:07:15 -0400
From:	Chris Ball <cjb@...top.org>
To:	NeilBrown <neilb@...e.de>
Cc:	Venkatraman S <svenkatr@...com>, Balaji T K <balajitk@...com>,
	Rajendra Nayak <rnayak@...com>, linux-omap@...r.kernel.org,
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MMC/omap_hsmmc: handle failure of regulator_get better.

Hi,

On Sun, Jul 29 2012, NeilBrown wrote:
> 1/ if regulator_get fails, return an error.  This is important
>    if it failed with EPROBE_DEFER, as the probe needs to be
>    deferred.
>
> 2/ Don't set .set_power until the regulator has been found, or
>    the deferred probe will not bother calling omap_hsmmc_reg_get().
>
> Signed-off-by: NeilBrown <neilb@...e.de>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 389a3ee..f052c29 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -299,12 +299,12 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
>  	struct regulator *reg;
>  	int ocr_value = 0;
>  
> -	mmc_slot(host).set_power = omap_hsmmc_set_power;
> -
>  	reg = regulator_get(host->dev, "vmmc");
>  	if (IS_ERR(reg)) {
>  		dev_dbg(host->dev, "vmmc regulator missing\n");
> +		return PTR_ERR(reg);
>  	} else {
> +		mmc_slot(host).set_power = omap_hsmmc_set_power;
>  		host->vcc = reg;
>  		ocr_value = mmc_regulator_get_ocrmask(reg);
>  		if (!mmc_slot(host).ocr_mask) {

Thanks, pushed to mmc-next for 3.7.

- Chris.
-- 
Chris Ball   <cjb@...top.org>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ