Message ID | b61a81b2-0101-43bd-a4f6-09cf3a016484@stanley.mountain (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2,next] drm/vc4: unlock on error in vc4_hvs_get_fifo_frame_count() | expand |
On Thu, 12 Dec 2024 at 12:47, Dan Carpenter <dan.carpenter@linaro.org> wrote: > > The default statement is never used in real life. However, if it were > used for some reason then call drm_dev_exit() before returning. > > Fixes: 8f2fc64773be ("drm/vc4: Fix reading of frame count on GEN5 / Pi4") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Thanks for the update. Dave > --- > v2: style fixes > > drivers/gpu/drm/vc4/vc4_hvs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c > index b42027636c71..4811d794001f 100644 > --- a/drivers/gpu/drm/vc4/vc4_hvs.c > +++ b/drivers/gpu/drm/vc4/vc4_hvs.c > @@ -522,7 +522,7 @@ u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) > break; > default: > drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); > - return 0; > + break; > } > > drm_dev_exit(idx); > -- > 2.45.2 >
On Thu, 12 Dec 2024 at 14:33, Dave Stevenson <dave.stevenson@raspberrypi.com> wrote: > > On Thu, 12 Dec 2024 at 12:47, Dan Carpenter <dan.carpenter@linaro.org> wrote: > > > > The default statement is never used in real life. However, if it were > > used for some reason then call drm_dev_exit() before returning. > > > > Fixes: 8f2fc64773be ("drm/vc4: Fix reading of frame count on GEN5 / Pi4") > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > > Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Applied to drm-misc-next > Thanks for the update. > Dave > > > --- > > v2: style fixes > > > > drivers/gpu/drm/vc4/vc4_hvs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c > > index b42027636c71..4811d794001f 100644 > > --- a/drivers/gpu/drm/vc4/vc4_hvs.c > > +++ b/drivers/gpu/drm/vc4/vc4_hvs.c > > @@ -522,7 +522,7 @@ u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) > > break; > > default: > > drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); > > - return 0; > > + break; > > } > > > > drm_dev_exit(idx); > > -- > > 2.45.2 > >
diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c index b42027636c71..4811d794001f 100644 --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c @@ -522,7 +522,7 @@ u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) break; default: drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); - return 0; + break; } drm_dev_exit(idx);
The default statement is never used in real life. However, if it were used for some reason then call drm_dev_exit() before returning. Fixes: 8f2fc64773be ("drm/vc4: Fix reading of frame count on GEN5 / Pi4") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- v2: style fixes drivers/gpu/drm/vc4/vc4_hvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)