/* Check whether this plane supports the fb pixel format. */
ret = drm_plane_check_pixel_format(plane, state->fb->pixel_format);
if (ret) {
- const char *format_name = drm_get_format_name(state->fb->pixel_format);
+ char *format_name = drm_get_format_name(state->fb->pixel_format);
DRM_DEBUG_ATOMIC("Invalid pixel format %s\n", format_name);
kfree(format_name);
return ret;