Re: [PATCH] ACPI: TAD: Fix reference imbalance in acpi_tad_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
  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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux