From: Hanjun Guo <guohanjun@huawei.com>
To: Zhang Qilong <zhangqilong3@huawei.com>, <rjw@rjwysocki.net>,
<lenb@kernel.org>
Cc: <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] ACPI: TAD: Fix reference imbalance in acpi_tad_probe
Date: Mon, 16 Nov 2020 09:40:05 +0800 [thread overview]
Message-ID: <5b9e0aac-eed1-e372-19c8-46c70ce9493c@huawei.com> (raw)
In-Reply-To: <20201114111834.3466695-1-zhangqilong3@huawei.com>
On 2020/11/14 19:18, Zhang Qilong wrote:
> It have enabled runtime and suspend the device before going
> to fail branch. We should call pm_runtime_resume to keep the
> usage counter balanced and pm_runtime_disable to keep disable
> depth balanced sequentially.
>
> Fixes: 95c513ec84f7f ("ACPI: Add Time and Alarm Device (TAD) driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> drivers/acpi/acpi_tad.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
> index 7d45cce0c3c1..87ab606a0df8 100644
> --- a/drivers/acpi/acpi_tad.c
> +++ b/drivers/acpi/acpi_tad.c
> @@ -652,6 +652,8 @@ static int acpi_tad_probe(struct platform_device *pdev)
> return 0;
>
> fail:
> + pm_runtime_resume(dev);
> + pm_runtime_disable(dev);
> acpi_tad_remove(pdev);
acpi_tad_remove() did that job, so it's duplicate and wrong to add those
two function call I think.
Thanks
Hanjun
prev parent reply other threads:[~2020-11-16 1:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 11:18 [PATCH] ACPI: TAD: Fix reference imbalance in acpi_tad_probe Zhang Qilong
2020-11-16 1:40 ` Hanjun Guo [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=5b9e0aac-eed1-e372-19c8-46c70ce9493c@huawei.com \
--to=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=zhangqilong3@huawei.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).