aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_panel.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-03-29 00:24:10 +0000
committerJakub Kicinski <[email protected]>2024-03-29 00:25:57 +0000
commit5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f (patch)
treeb86edc39098cca1d0e53e46dceec6ca856183642 /drivers/gpu/drm/drm_panel.c
parentMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf... (diff)
parentMerge tag 'net-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff)
downloadkernel-5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f.tar.gz
kernel-5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts, or adjacent changes. Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/drm_panel.c')
-rw-r--r--drivers/gpu/drm/drm_panel.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index e814020bbcd3..cfbe020de54e 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -274,19 +274,24 @@ EXPORT_SYMBOL(drm_panel_disable);
* The modes probed from the panel are automatically added to the connector
* that the panel is attached to.
*
- * Return: The number of modes available from the panel on success or a
- * negative error code on failure.
+ * Return: The number of modes available from the panel on success, or 0 on
+ * failure (no modes).
*/
int drm_panel_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
if (!panel)
- return -EINVAL;
+ return 0;
- if (panel->funcs && panel->funcs->get_modes)
- return panel->funcs->get_modes(panel, connector);
+ if (panel->funcs && panel->funcs->get_modes) {
+ int num;
- return -EOPNOTSUPP;
+ num = panel->funcs->get_modes(panel, connector);
+ if (num > 0)
+ return num;
+ }
+
+ return 0;
}
EXPORT_SYMBOL(drm_panel_get_modes);