drm: xlnx: zynqmp_dpsub: Don't use drmm_kcalloc() for temporary data
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 6 Aug 2021 11:29:52 +0000 (14:29 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 19 Oct 2022 13:51:04 +0000 (16:51 +0300)
commit96e0e3e3a210ab9c4894da2250bb583dd61ab3a2
tree2063166eb6b782b9c787284ecdf9ecc17ae3ab95
parent531306f54e84b9502f18db66f81729df7bc5fbe3
drm: xlnx: zynqmp_dpsub: Don't use drmm_kcalloc() for temporary data

The array of formats passed to drm_universal_plane_init() doesn't need
to outlive the function call, as it's copied internally. Use kcalloc()
instead of drmm_kcalloc() to allocate it, and free it right after usage.

While at it, move the allocation and initialization of the formats array
to a separate function, to prepare for splitting the DRM plane handling
to a separate file.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/xlnx/zynqmp_disp.c