diff options
author | Steven Price <steven.price@arm.com> | 2021-12-03 10:28:15 +0000 |
---|---|---|
committer | Liviu Dudau <liviu.dudau@arm.com> | 2022-04-28 16:13:04 +0100 |
commit | 4b674dd69701c2e22e8e7770c1706a69f3b17269 (patch) | |
tree | 3203deb276e310be36af01a33102d5e761a337b9 /drivers/phy/cadence | |
parent | 15342f930ebebcfe36f2415049736a77d7d2e045 (diff) |
drm/plane: Move range check for format_count earlier
While the check for format_count > 64 in __drm_universal_plane_init()
shouldn't be hit (it's a WARN_ON), in its current position it will then
leak the plane->format_types array and fail to call
drm_mode_object_unregister() leaking the modeset identifier. Move it to
the start of the function to avoid allocating those resources in the
first place.
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/dri-devel/20211203102815.38624-1-steven.price@arm.com/
Diffstat (limited to 'drivers/phy/cadence')
0 files changed, 0 insertions, 0 deletions