drm/vc4: unlock on error in vc4_hvs_get_fifo_frame_count()

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>
Link: https://patchwork.freedesktop.org/patch/msgid/b61a81b2-0101-43bd-a4f6-09cf3a016484@stanley.mountain
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dan Carpenter 2024-12-12 15:47:37 +03:00 committed by Dave Stevenson
parent bc0e01b536
commit fcf15fd8ed

View File

@ -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);