Message ID | Yqh6VdNiDvJYMOQ+@kili (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: logicvc: fix error code in logicvc_layer_init() | expand |
Hi, On Tue 14 Jun 22, 15:08, Dan Carpenter wrote: > 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> Thanks for the fix! Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Paul > --- > drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c > index bae1c7f99569..9c94b67afbed 100644 > --- a/drivers/gpu/drm/logicvc/logicvc_layer.c > +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c > @@ -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; > } > > -- > 2.35.1 >
Hi, On Fri 24 Jun 22, 16:35, Paul Kocialkowski wrote: > Hi, > > On Tue 14 Jun 22, 15:08, Dan Carpenter wrote: > > 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> > > Thanks for the fix! > > Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Pushed to drm-misc-next, thanks! Paul > > --- > > drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c > > index bae1c7f99569..9c94b67afbed 100644 > > --- a/drivers/gpu/drm/logicvc/logicvc_layer.c > > +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c > > @@ -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; > > } > > > > -- > > 2.35.1 > > > > -- > Paul Kocialkowski, Bootlin > Embedded Linux and kernel engineering > https://bootlin.com
diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c index bae1c7f99569..9c94b67afbed 100644 --- a/drivers/gpu/drm/logicvc/logicvc_layer.c +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c @@ -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; }
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> --- drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + 1 file changed, 1 insertion(+)