From: Zhang Qilong <zhangqilong3@huawei.com>
To: <rjw@rjwysocki.net>, <lenb@kernel.org>
Cc: <linux-acpi@vger.kernel.org>
Subject: [PATCH] ACPI: TAD: Fix reference imbalance in acpi_tad_probe
Date: Sat, 14 Nov 2020 19:18:34 +0800 [thread overview]
Message-ID: <20201114111834.3466695-1-zhangqilong3@huawei.com> (raw)
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);
return ret;
}
--
2.25.4
next reply other threads:[~2020-11-14 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 11:18 Zhang Qilong [this message]
2020-11-16 1:40 ` [PATCH] ACPI: TAD: Fix reference imbalance in acpi_tad_probe Hanjun Guo
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=20201114111834.3466695-1-zhangqilong3@huawei.com \
--to=zhangqilong3@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).