mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiawen Liu <1298662399@qq.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Douglas Anderson <dianders@chromium.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/bridge: ti-sn65dsi86: fail PWM probe if runtime PM setup fails
Date: Sun, 29 Nov 2026 17:43:56 +0400	[thread overview]
Message-ID: <tencent_C15FAC4A92FAE82277C8765D29277E408C07@qq.com> (raw)

ti_sn_pwm_probe() ignored a failure from devm_pm_runtime_enable(). The
helper rolls runtime PM back when action registration fails, but the
probe could then successfully register the PWM chip. A later PWM apply
operation would be unable to resume the auxiliary device.

Propagate the runtime PM setup error before registering the PWM chip.

Fixes: eb3f7cbee294 ("drm/bridge: ti-sn65dsi86: Associate PWM device to auxiliary device")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 48b83df9aed61..bbf9491059375 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1721,6 +1721,7 @@ static int ti_sn_pwm_probe(struct auxiliary_device *adev,
 {
 	struct pwm_chip *chip;
 	struct ti_sn65dsi86 *pdata = dev_get_drvdata(adev->dev.parent);
+	int ret;
 
 	pdata->pchip = chip = devm_pwmchip_alloc(&adev->dev, 1, 0);
 	if (IS_ERR(chip))
@@ -1731,7 +1732,9 @@ static int ti_sn_pwm_probe(struct auxiliary_device *adev,
 	chip->ops = &ti_sn_pwm_ops;
 	chip->of_xlate = of_pwm_single_xlate;
 
-	devm_pm_runtime_enable(&adev->dev);
+	ret = devm_pm_runtime_enable(&adev->dev);
+	if (ret)
+		return ret;
 
 	return pwmchip_add(chip);
 }
-- 
2.34.1


                 reply	other threads:[~2026-11-29 13:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=tencent_C15FAC4A92FAE82277C8765D29277E408C07@qq.com \
    --to=1298662399@qq.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®