dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Piyush Patle" <piyushpatle228@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/bridge: simple-bridge: replace deprecated DRM logging macros
Date: Sat, 06 Jun 2026 19:42:42 +0000	[thread overview]
Message-ID: <20260606194243.43FD71F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260606193625.24465-2-piyushpatle228@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but proceeding with hardware enablement after a power regulator failure can cause hardware damage. In `simple_bridge_enable()`, if `regulator_enable(sbridge->vdd)` fails, an error is logged but the function continues and unconditionally asserts the `enable` GPIO. Driving logic signals into an unpowered integrated circuit can back-power the chip through its IO pins, potentially leading to latch-up or permanent hardware damage. The function should abort early if the regulator fails to enable.
--

commit db4bbe0cc09da9b2a76aa9fd998d0133aa578bd2
Author: Piyush Patle <piyushpatle228@gmail.com>

drm/bridge: simple-bridge: replace deprecated DRM logging macros

Replace deprecated DRM_ERROR() and DRM_INFO() with device-aware
drm_err() and drm_info(), passing bridge->dev or connector->dev.

> diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c
> index 8aa31ca3c72d4..d8457e68c342f 100644
> --- a/drivers/gpu/drm/bridge/simple-bridge.c
> +++ b/drivers/gpu/drm/bridge/simple-bridge.c

[ ... ]

> @@ -140,7 +140,7 @@ static void simple_bridge_enable(struct drm_bridge *bridge)
>  	if (sbridge->vdd) {
>  		ret = regulator_enable(sbridge->vdd);
>  		if (ret)
> -			DRM_ERROR("Failed to enable vdd regulator: %d\n", ret);
> +			drm_err(bridge->dev, "Failed to enable vdd regulator: %d\n", ret);
>  	}
>  
>  	gpiod_set_value_cansleep(sbridge->enable, 1);

[Severity: High]
This isn't a bug introduced by this patch, but does proceeding with hardware
enablement after a power regulator failure risk hardware damage?

If regulator_enable() fails for sbridge->vdd, an error is logged, but the
function continues and unconditionally asserts the enable GPIO in
simple_bridge_enable().

Driving logic signals into an unpowered integrated circuit can back-power
the chip through its IO pins, potentially leading to latch-up or permanent
hardware damage.

Should the function abort early if the regulator fails to enable?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260606193625.24465-1-piyushpatle228@gmail.com?part=1

  reply	other threads:[~2026-06-06 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-06 19:36 [PATCH 0/5] drm/bridge: replace deprecated DRM logging macros Piyush Patle
2026-06-06 19:36 ` [PATCH 1/5] drm/bridge: simple-bridge: " Piyush Patle
2026-06-06 19:42   ` sashiko-bot [this message]
2026-06-06 19:36 ` [PATCH 2/5] drm/bridge: ti-tfp410: replace deprecated DRM_INFO macro Piyush Patle
2026-06-06 19:36 ` [PATCH 3/5] drm/bridge: chrontel-ch7033: replace deprecated DRM_ERROR macro Piyush Patle
2026-06-06 19:45   ` sashiko-bot
2026-06-06 19:36 ` [PATCH 4/5] drm/bridge: panel: " Piyush Patle
2026-06-06 19:36 ` [PATCH 5/5] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: " Piyush Patle

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=20260606194243.43FD71F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=piyushpatle228@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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