From: sashiko-bot@kernel.org
To: shao.mingyin@zte.com.cn
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH 4/5] pwm: dwc: Balance the runtime PM reference when configuring fails
Date: Fri, 06 Nov 2026 16:31:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-201825@kernel.org> (raw)
In-Reply-To: <20261107000734514kOTBjwDH_ZQx5Rq7e_WwC@zte.com.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] pwm: dwc: inaccurate Fixes tag for dwc_pwm_apply() runtime PM
leak
--
commit db856b4aa6941fc2e987c693ae9e69e8f32d25a5
Author: Shao Mingyin <shao.mingyin@zte.com.cn>
> pwm: dwc: Balance the runtime PM reference when configuring fails
>
> dwc_pwm_apply() takes a runtime PM reference with pm_runtime_get_sync()
> when transitioning a channel from disabled to enabled and returns the
> result of __dwc_pwm_configure_timer() directly. If that call fails (e.g.
> with -ERANGE for an out-of-range duty cycle or period) the reference is
> never put, so the device never reaches the suspended state again and the
> usage counter keeps growing.
>
> Put the reference when the configuration fails on the enable transition.
>
> Fixes: 721ee1884883 ("pwm: dwc: split pci out of core driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
[Severity: Low]
721ee1884883 ("pwm: dwc: split pci out of core driver") only moved
dwc_pwm_apply() from drivers/pwm/pwm-dwc.c to drivers/pwm/pwm-dwc-core.c.
Should the Fixes tag reference the commit that originally introduced the
unbalanced pm_runtime_get_sync() instead:
Fixes: 1ed2b3fca645 ("pwm: Add DesignWare PWM Controller Driver")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107000724697MsR-XmE4V-ADPPMr3wGom@zte.com.cn?part=4
next prev parent reply other threads:[~2026-11-06 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 16:07 [PATCH 0/5] pwm: fix overflow, truncation and error-path reference leaks shao.mingyin
2026-11-06 16:07 ` shao.mingyin
2026-11-06 16:07 ` [PATCH 1/5] pwm: dwc: Fix 32 bit overflow when computing duty/period in get_state shao.mingyin
2026-11-06 16:07 ` [PATCH 2/5] pwm: airoha: Fix 32 bit overflow when converting duty ticks to ns shao.mingyin
2026-11-06 16:07 ` [PATCH 3/5] pwm: adp5585: Clamp on/off counters to the 16 bit register range shao.mingyin
2026-11-06 16:27 ` sashiko-bot
2026-11-06 16:46 ` shao.mingyin
2026-11-06 16:07 ` [PATCH 4/5] pwm: dwc: Balance the runtime PM reference when configuring fails shao.mingyin
2026-11-06 16:31 ` sashiko-bot [this message]
2026-11-06 16:46 ` shao.mingyin
2026-11-06 16:07 ` [PATCH 5/5] pwm: rockchip: Fix pclk leak in get_state error path shao.mingyin
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=sashiko-outbox-201825@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shao.mingyin@zte.com.cn \
/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.