Skip to content

Commit

Permalink
drm/imx/ipuv3: do not return negative values from .get_modes()
Browse files Browse the repository at this point in the history
[ Upstream commit c2da9ad ]

The .get_modes() hooks aren't supposed to return negative error
codes. Return 0 for no modes, whatever the reason.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: stable@vger.kernel.org
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/311f6eec96d47949b16a670529f4d89fcd97aefa.1709913674.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jnikula authored and gregkh committed Apr 3, 2024
1 parent 1cef1ef commit dad43b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/imx/ipuv3/parallel-display.c
Expand Up @@ -72,14 +72,14 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
int ret;

if (!mode)
return -EINVAL;
return 0;

ret = of_get_drm_display_mode(np, &imxpd->mode,
&imxpd->bus_flags,
OF_USE_NATIVE_MODE);
if (ret) {
drm_mode_destroy(connector->dev, mode);
return ret;
return 0;
}

drm_mode_copy(mode, &imxpd->mode);
Expand Down

0 comments on commit dad43b0

Please sign in to comment.