summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/logicvc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-06-14 15:08:53 +0300
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2022-06-24 18:03:42 +0300
commitd54cda74a9a27d6a18c6b670f7299114272a5e50 (patch)
treeb7e266e39016c4a6f891bd4bcbed1204894c593e /drivers/gpu/drm/logicvc
parent5e8034364c22050b8564060e79947d094a65d45e (diff)
downloadlinux-d54cda74a9a27d6a18c6b670f7299114272a5e50.tar.xz
drm: logicvc: fix error code in logicvc_layer_init()
Return -EINVAL if logicvc_layer_formats_lookup() fails. Don't return success. Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/Yqh6VdNiDvJYMOQ+@kili
Diffstat (limited to 'drivers/gpu/drm/logicvc')
-rw-r--r--drivers/gpu/drm/logicvc/logicvc_layer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
index fbebe966f93a..463653b2c109 100644
--- a/drivers/gpu/drm/logicvc/logicvc_layer.c
+++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
@@ -491,6 +491,7 @@ static int logicvc_layer_init(struct logicvc_drm *logicvc,
if (!formats) {
drm_err(drm_dev, "Failed to lookup formats for layer #%d\n",
index);
+ ret = -EINVAL;
goto error;
}