summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-03-08 17:03:43 +0100
committerJani Nikula <jani.nikula@intel.com>2024-03-13 09:44:14 +0100
commitc2da9ada64962fcd2e6395ed9987b9874ea032d3 (patch)
tree67eca5b25c9be721327e15b9d29ad959a324fe3b
parentdrm/bridge: lt8912b: do not return negative values from .get_modes() (diff)
downloadlinux-c2da9ada64962fcd2e6395ed9987b9874ea032d3.tar.xz
linux-c2da9ada64962fcd2e6395ed9987b9874ea032d3.zip
drm/imx/ipuv3: do not return negative values from .get_modes()
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>
-rw-r--r--drivers/gpu/drm/imx/ipuv3/parallel-display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
index 70349739dd89..55dedd73f528 100644
--- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c
+++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
@@ -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);