drm/exynos/vidi: Remove redundant error handling in vidi_get_modes()
authorWentao Liang <vulab@iscas.ac.cn>
Thu, 6 Mar 2025 04:27:20 +0000 (12:27 +0800)
committerInki Dae <inki.dae@samsung.com>
Wed, 23 Apr 2025 13:53:01 +0000 (22:53 +0900)
In the vidi_get_modes() function, if either drm_edid_dup() or
drm_edid_alloc() fails, the function will immediately return 0,
indicating that no display modes can be retrieved. However, in
the event of failure in these two functions, it is still necessary
to call the subsequent drm_edid_connector_update() function with
a NULL drm_edid as an argument. This ensures that operations such
as connector settings are performed in its callee function,
_drm_edid_connector_property_update. To maintain the integrity of
the operation, redundant error handling needs to be removed.

Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_vidi.c

index 08cf79a620253388354203d21d1cdb9f1db04276..e644e2382d77f4e64460b3c33be476e013264b95 100644 (file)
@@ -312,9 +312,6 @@ static int vidi_get_modes(struct drm_connector *connector)
        else
                drm_edid = drm_edid_alloc(fake_edid_info, sizeof(fake_edid_info));
 
-       if (!drm_edid)
-               return 0;
-
        drm_edid_connector_update(connector, drm_edid);
 
        count = drm_edid_connector_add_modes(connector);