Skip to contentSkip to conversation

drm: logicvc: fix error code in logicvc_layer_init()

PATCH Applied Dan Carpenter 2 participants 3 messages Jun 14, 2022 – Jun 24, 2022

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

PATCH 1/1 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")
---
 drivers/gpu/drm/logicvc/logicvc_layer.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/logicvc/logicvc_layer.c +1 -0
index bae1c7f99569..9c94b67afbed 100644
@@ -489,6 +489,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;
 	}
 
Signature · 1 line
2.35.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 5 lines · Dan Carpenter

Return -EINVAL if logicvc_layer_formats_lookup() fails. Don't return success.

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

Thanks for the fix!

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 bae1c7f99569..9c94b67afbed 100644
@@ -489,6 +489,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;
 	}
 
Signature · 1 line
2.35.1
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#2 lore raw

Hi,

Quoted 6 lines · Paul Kocialkowski

Hi,

Quoted 3 lines · Dan Carpenter

Return -EINVAL if logicvc_layer_formats_lookup() fails. Don't return success.

Quoted 6 lines
Quoted 2 lines
Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")

Thanks for the fix!

Pushed to drm-misc-next, thanks!

Paul

Quoted 24 lines
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 bae1c7f99569..9c94b67afbed 100644
@@ -489,6 +489,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;
 	}
 
Signature · 1 line
2.35.1
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com