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>
Showing
Please register or sign in to comment