Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/omap: dss: unreachable NULL check and error label in
  omapdss_device_init_output()
--

commit f6c9c857e7ddd89b0afd04f9a84b349ebb1ccb32
Author: Andreas Kemnade <[email protected]>

drm/omap: dss: fix handling deferrals

This commit forwards -EPROBE_DEFER from of_drm_get_bridge_by_endpoint() in
omapdss_device_init_output() instead of ignoring it as a missing video
sink.

> diff --git a/drivers/gpu/drm/omapdrm/dss/output.c 
> b/drivers/gpu/drm/omapdrm/dss/output.c
> index 36d37deac8026..b5cef5093a883 100644
> --- a/drivers/gpu/drm/omapdrm/dss/output.c
> +++ b/drivers/gpu/drm/omapdrm/dss/output.c
> @@ -24,6 +24,9 @@ int omapdss_device_init_output(struct omap_dss_device *out,
>  
>       bridge = of_drm_get_bridge_by_endpoint(out->dev->of_node, out->of_port, 
> 0);
>       if (IS_ERR(bridge)) {
> +             if (PTR_ERR(bridge) == -EPROBE_DEFER)
> +                     return PTR_ERR(bridge);
> +
>               dev_dbg(out->dev, "failed to find video sink\n");
>               return 0;
>       }

[Severity: Low]
Can the !out->bridge check, local variable ret, and the error label later
in omapdss_device_init_output() be removed as well?

of_drm_get_bridge_by_endpoint() returns an error pointer rather than NULL
when no bridge is found, and the IS_ERR(bridge) branch returns early. With
-EPROBE_DEFER handled here, out->bridge is never NULL in the local_bridge
block and the error path left over from b7e9b93fc8ec ("drm/omap: dss:
don't create a panel_bridge") is unreachable:

drivers/gpu/drm/omapdrm/dss/output.c:omapdss_device_init_output() {
        ...
        if (local_bridge) {
                if (!out->bridge) {
                        ret = -EPROBE_DEFER;
                        goto error;
                }
        ...
error:
        omapdss_device_cleanup_output(out);
        return ret;
}

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to