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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Sep 2013 07:59:42 -0500
From:	Nishanth Menon <nm@...com>
To:	Jingoo Han <jg1.han@...sung.com>
CC:	"'Mark Brown'" <broonie@...nel.org>,
	"'Liam Girdwood'" <lgirdwood@...il.com>,
	<linux-kernel@...r.kernel.org>, "'Balaji T K'" <balajitk@...com>
Subject: Re: [PATCH 19/20] regulator: twl: use devm_regulator_register()

On 17:15-20130925, Jingoo Han wrote:
> Use devm_regulator_register() to make cleanup paths simpler.
> 
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> ---
>  drivers/regulator/twl-regulator.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
> index 78aae4c..8ebd785 100644
> --- a/drivers/regulator/twl-regulator.c
> +++ b/drivers/regulator/twl-regulator.c
> @@ -1188,7 +1188,7 @@ static int twlreg_probe(struct platform_device *pdev)
>  	config.driver_data = info;
>  	config.of_node = pdev->dev.of_node;
>  
> -	rdev = regulator_register(&info->desc, &config);
> +	rdev = devm_regulator_register(&pdev->dev, &info->desc, &config);
>  	if (IS_ERR(rdev)) {
>  		dev_err(&pdev->dev, "can't register %s, %ld\n",
>  				info->desc.name, PTR_ERR(rdev));
> @@ -1217,7 +1217,6 @@ static int twlreg_remove(struct platform_device *pdev)
>  	struct regulator_dev *rdev = platform_get_drvdata(pdev);
>  	struct twlreg_info *info = rdev->reg_data;
>  
> -	regulator_unregister(rdev);
>  	kfree(info);
>  	return 0;
>  }
> -- 
> 1.7.10.4
> 
> 
Acked-by: Nishanth Menon <nm@...com>
-- 
Regards,
Nishanth Menon
--
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