devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Lh Kuo 郭力豪" <lh.Kuo@sunplus.com>,
	"Li-hao Kuo" <lhjeff911@gmail.com>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"amitk@kernel.org" <amitk@kernel.org>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v10 1/2] thermal: Add thermal driver for Sunplus
Date: Thu, 14 Jul 2022 08:50:02 +0200	[thread overview]
Message-ID: <32b30b60-26f7-50e9-7dca-c25bc3f4014d@linaro.org> (raw)
In-Reply-To: <a510b35f89034f60a05d6dbe7245e789@sphcmbx01.sunplus.com.tw>

On 14/07/2022 07:32, Lh Kuo 郭力豪 wrote:
>>> +}
>>> +
>>> +static int sunplus_thermal_remove(struct platform_device *pdev) {
>>> +	struct sp_thermal_data *sp_data = platform_get_drvdata(pdev);
>>> +
>>> +	thermal_zone_of_sensor_unregister(&pdev->dev, sp_data->pcb_tz);
>>
>> You used devm to register, so this looks wrong and will lead to double free.
>>
>>
> 
> You mean the remove function is not needed.  ??

At least this call but after its removal the entire function would be
empty, I think.


Best regards,
Krzysztof

  reply	other threads:[~2022-07-14  6:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  7:30 [PATCH v10 0/2] Add thermal control driver for Sunplus SoC Li-hao Kuo
2022-07-12  7:30 ` [PATCH v10 1/2] thermal: Add thermal driver for Sunplus Li-hao Kuo
2022-07-13  7:52   ` Krzysztof Kozlowski
2022-07-14  5:32     ` Lh Kuo 郭力豪
2022-07-14  6:50       ` Krzysztof Kozlowski [this message]
2022-07-21  3:04   ` kernel test robot
2022-07-21  6:32   ` Krzysztof Kozlowski
2022-07-12  7:30 ` [PATCH v10 2/2] dt-bindings: thermal: Add Sunplus schema Li-hao Kuo
2022-07-13  7:50   ` Krzysztof Kozlowski

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=32b30b60-26f7-50e9-7dca-c25bc3f4014d@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lh.Kuo@sunplus.com \
    --cc=lhjeff911@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).