From: sashiko-bot@kernel.org
To: "Golla Nagendra" <nagendra.golla@amd.com>
Cc: robh@kernel.org, Frank.Li@kernel.org, vkoul@kernel.org,
dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH V3 1/6] dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path
Date: Mon, 10 Aug 2026 10:28:13 +0000 [thread overview]
Message-ID: <20260810102814.4A6981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260810100452.426320-2-nagendra.golla@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The introduced pm_runtime_put_sync() fails to synchronously suspend the device because autosuspend is enabled, leaving clocks active.
--
--- Patch [1]: [PATCH V3 1/6] dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path ---
commit 8bb5754b8f17c08d0144740ac308428274806a68
Author: Golla Nagendra <nagendra.golla@amd.com>
dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path
This commit attempts to fix a reference leak on the probe error path. When
probe fails after successfully waking up the device, it adds a missing
runtime PM put call to drop the usage count and allow the device to suspend.
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> --- a/drivers/dma/xilinx/zynqmp_dma.c
> +++ b/drivers/dma/xilinx/zynqmp_dma.c
[ ... ]
> @@ -1152,6 +1152,8 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
> err_disable_pm:
> if (!pm_runtime_enabled(zdev->dev))
> zynqmp_dma_runtime_suspend(zdev->dev);
> + else
> + pm_runtime_put_sync(zdev->dev);
> pm_runtime_disable(zdev->dev);
[Severity: Medium]
Does this actually suspend the device and disable the clocks?
Since autosuspend is enabled for this device earlier in zynqmp_dma_probe():
pm_runtime_use_autosuspend(zdev->dev);
Calling pm_runtime_put_sync() will only schedule an asynchronous suspend
timer. The immediately following pm_runtime_disable() will cancel this
pending timer before the suspend callback ever runs, leaving the clocks
permanently enabled.
Should this use pm_runtime_put_sync_suspend() instead to force a synchronous
suspend and bypass the autosuspend delay before disabling runtime PM?
> return ret;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260810100452.426320-1-nagendra.golla@amd.com?part=1
next prev parent reply other threads:[~2026-08-10 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 10:04 [PATCH V3 0/6] dmaengine: zynqmp_dma: Per-channel reset, IRQ guard improvements, and PM fixes Golla Nagendra
2026-08-10 10:04 ` [PATCH V3 1/6] dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path Golla Nagendra
2026-08-10 10:28 ` sashiko-bot [this message]
2026-08-10 10:04 ` [PATCH V3 2/6] PM: runtime: Add pm_runtime_if_active guard and conditional variant Golla Nagendra
2026-08-10 10:25 ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 3/6] dmaengine: zynqmp_dma: Guard IRQ handler against spurious interrupts Golla Nagendra
2026-08-10 10:04 ` [PATCH V3 4/6] dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support Golla Nagendra
2026-08-10 10:20 ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 5/6] dmaengine: zynqmp_dma: Add new compatible string for Versal Net Golla Nagendra
2026-08-10 10:20 ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 6/6] dmaengine: zynqmp_dma: Add per-channel reset support Golla Nagendra
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=20260810102814.4A6981F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=nagendra.golla@amd.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.