From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
arvindY <arvind.yadav.cs@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: RE: Re: [PATCH] PM / devfreq: use put_device() instead of kfree()
Date: Wed, 18 Apr 2018 16:57:35 +0900 [thread overview]
Message-ID: <20180418075735epcms1p3c59f097441aabc6af5d7892298c6fdb2@epcms1p3> (raw)
In-Reply-To: <5AD01937.1070504@samsung.com>
>On 2018년 04월 13일 11:37, arvindY wrote:
>> On Friday 13 April 2018 07:59 AM, Chanwoo Choi wrote:
>>> On 2018년 04월 13일 11:15, arvindY wrote:
>>>> On Friday 13 April 2018 06:43 AM, Chanwoo Choi wrote:
>>>>> On 2018년 04월 13일 10:03, Chanwoo Choi wrote:
[]
>>>>>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>>>>>> index fe2af6a..a225b94 100644
>>>>>>> --- a/drivers/devfreq/devfreq.c
>>>>>>> +++ b/drivers/devfreq/devfreq.c
>>>>>>> @@ -625,7 +625,8 @@ struct devfreq *devfreq_add_device(struct device *dev,
>>>>>>> err = device_register(&devfreq->dev);
>>>>>>> if (err) {
>>>>>>> mutex_unlock(&devfreq->lock);
>>>>>>> - goto err_dev;
>>>>>>> + put_device(&devfreq->dev);
>>>>>>> + goto err_out;
>>>>>>> }
>>>>>>> devfreq->trans_table = devm_kzalloc(&devfreq->dev,
>>>>>>> @@ -671,6 +672,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
>>>>>>> mutex_unlock(&devfreq_list_lock);
>>>>>>> device_unregister(&devfreq->dev);
>>>>>>> + devfreq = NULL;
>>>>>>> err_dev:
>>>>>>> if (devfreq)
>>>>>>> kfree(devfreq);
>>>>>>>
Ah.. this was critcal. Thanks!
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
>Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Cheers,
MyungJoo
prev parent reply other threads:[~2018-04-18 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180330114418epcas5p1affd1c3d97e7422dd33e6d3ca73073be@epcas5p1.samsung.com>
2018-03-30 11:44 ` Arvind Yadav
2018-04-13 1:03 ` Chanwoo Choi
2018-04-13 1:13 ` Chanwoo Choi
2018-04-13 2:15 ` arvindY
2018-04-13 2:29 ` Chanwoo Choi
2018-04-13 2:37 ` arvindY
2018-04-13 2:43 ` Chanwoo Choi
[not found] ` <CGME20180330114418epcas5p1affd1c3d97e7422dd33e6d3ca73073be@epcms1p3>
2018-04-18 7:57 ` MyungJoo Ham [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=20180418075735epcms1p3c59f097441aabc6af5d7892298c6fdb2@epcms1p3 \
--to=myungjoo.ham@samsung.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/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
all inboxes | Powered by JetHome®