public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sangjung <sangjung.woo@samsung.com>
To: sw0312.kim@samsung.com
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] extcon: arizona: Use devm_extcon_dev_register()
Date: Thu, 17 Apr 2014 10:00:32 +0900	[thread overview]
Message-ID: <534F27B0.4060709@samsung.com> (raw)
In-Reply-To: <534E5F09.8070703@samsung.com>

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@samsung.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

      reply	other threads:[~2014-04-17  1:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 10:26 [PATCH 0/8] Resource-managed extcon device register function Sangjung Woo
2014-04-16 10:26 ` [PATCH 1/8] extcon: Add resource-managed extcon " Sangjung Woo
2014-04-17  5:35   ` Chanwoo Choi
2014-04-16 10:26 ` [PATCH 2/8] extcon: adc-jack: Use devm_extcon_dev_register() Sangjung Woo
2014-04-16 10:26 ` [PATCH 3/8] extcon: gpio: " Sangjung Woo
2014-04-16 10:26 ` [PATCH 4/8] extcon: max14577: " Sangjung Woo
2014-04-16 11:40   ` Krzysztof Kozlowski
2014-04-16 10:27 ` [PATCH 5/8] extcon: max77693: " Sangjung Woo
2014-04-16 11:23   ` Krzysztof Kozlowski
2014-04-16 10:27 ` [PATCH 6/8] extcon: max8997: " Sangjung Woo
2014-04-16 11:23   ` Krzysztof Kozlowski
2014-04-16 10:27 ` [PATCH 7/8] extcon: palmas: " Sangjung Woo
2014-04-16 10:27 ` [PATCH 8/8] extcon: arizona: " Sangjung Woo
2014-04-16 10:44   ` Seung-Woo Kim
2014-04-17  1:00     ` Sangjung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534F27B0.4060709@samsung.com \
    --to=sangjung.woo@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox