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:	Thu, 17 Apr 2014 10:00:32 +0900
From:	Sangjung <sangjung.woo@...sung.com>
To:	sw0312.kim@...sung.com
Cc:	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] extcon: arizona: Use devm_extcon_dev_register()

To Seung-Woo.


On 04/16/2014 07:44 PM, Seung-Woo Kim wrote:
> Hi,
>
> On 2014³â 04¿ù 16ÀÏ 19:27, Sangjung Woo wrote:
>> Use the resource-managed extcon device register function (i.e.
>> devm_extcon_dev_register()) instead of extcon_dev_register(). If extcon device
>> is attached with this function, that extcon device is automatically unregistered
>> on driver detach. That reduces tiresome managing code.
>>
>> Signed-off-by: Sangjung Woo <sangjung.woo@...sung.com>
>> ---
>>  drivers/extcon/extcon-arizona.c |   13 ++++---------
>>  1 file changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
>> index 98a14f6..40e6c0b 100644
>> --- a/drivers/extcon/extcon-arizona.c
>> +++ b/drivers/extcon/extcon-arizona.c
>> @@ -1105,15 +1105,13 @@ static int arizona_extcon_probe(struct platform_device *pdev)
>>  	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
>>  	if (!info) {
>>  		dev_err(&pdev->dev, "Failed to allocate memory\n");
>> -		ret = -ENOMEM;
>> -		goto err;
>> +		return -ENOMEM;
>>  	}
>>  
>>  	info->micvdd = devm_regulator_get(arizona->dev, "MICVDD");
>>  	if (IS_ERR(info->micvdd)) {
>> -		ret = PTR_ERR(info->micvdd);
>>  		dev_err(arizona->dev, "Failed to get MICVDD: %d\n", ret);
> Assignment to ret is removed but it is still used here.

You're right.
I will fix and send it as second version.

Thank you for your comment.

BRs,
Sangjung
--
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