]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm: logicvc: fix error code in logicvc_layer_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Jun 2022 12:08:53 +0000 (15:08 +0300)
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 24 Jun 2022 15:03:42 +0000 (17:03 +0200)
Return -EINVAL if logicvc_layer_formats_lookup() fails.  Don't return
success.

Fixes: 03b72aa1419a ("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
drivers/gpu/drm/logicvc/logicvc_layer.c

index fbebe966f93a6b9919399c5bf385afe58b983aad..463653b2c109e162a8a4b559dd54c554b7d47430 100644 (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;
        }