drm: logicvc: fix error code in logicvc_layer_init()
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")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/logicvc/logicvc_layer.c +1 -0
@@ -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
Hi,
Quoted 5 lines · Dan Carpenter
Return
-EINVALiflogicvc_layer_formats_lookup()fails. Don't return success.Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")Signed-off-by Dan Carpenter <[email protected]>
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@@ -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
Paul Kocialkowski
AppliedHi,
Quoted 6 lines · Paul Kocialkowski
Hi,
Quoted 3 lines · Dan Carpenter
Return
-EINVALiflogicvc_layer_formats_lookup()fails. Don't return success.
Quoted 6 lines
Quoted 2 lines
Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")Signed-off-by Dan Carpenter <[email protected]>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@@ -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.1Signature · 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