Skip to contentSkip to conversation

drm/logicvc: Fix error return code in logicvc_layer_init()

PATCH In review Yang Yingliang 2 participants 2 messages Jun 23, 2022 – Jun 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/logicvc: Fix error return code in logicvc_layer_init()

Fix error return code when logicvc_layer_formats_lookup() fails.

Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
---
 drivers/gpu/drm/logicvc/logicvc_layer.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/logicvc/logicvc_layer.c +1 -0
index fbebe966f93a..54b5931d879f 100644
@@ -489,6 +489,7 @@ static int logicvc_layer_init(struct logicvc_drm *logicvc,
 
 	formats = logicvc_layer_formats_lookup(layer);
 	if (!formats) {
+		ret = -EINVAL;
 		drm_err(drm_dev, "Failed to lookup formats for layer #%d\n",
 			index);
 		goto error;
Signature · 1 line
2.25.1
#1 lore raw

Hi Yang,

Quoted 5 lines · Yang Yingliang

Fix error return code when logicvc_layer_formats_lookup() fails.

Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")

Good catch! Yet Dan submitted a similar fix earlier, which is already on its way to the tree.

Thanks!

Paul

Quoted 19 lines
---
 drivers/gpu/drm/logicvc/logicvc_layer.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/logicvc/logicvc_layer.c +1 -0
index fbebe966f93a..54b5931d879f 100644
@@ -489,6 +489,7 @@ static int logicvc_layer_init(struct logicvc_drm *logicvc,
 
 	formats = logicvc_layer_formats_lookup(layer);
 	if (!formats) {
+		ret = -EINVAL;
 		drm_err(drm_dev, "Failed to lookup formats for layer #%d\n",
 			index);
 		goto error;
Signature · 1 line
2.25.1
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com