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 <[email protected]>

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/[email protected]?part=1

Reply via email to