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
This commit is contained in:
Dan Carpenter 2022-06-14 15:08:53 +03:00 committed by Paul Kocialkowski
parent 5e8034364c
commit d54cda74a9

View File

@ -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;
}