diff options
author | Eric Engestrom <eric@engestrom.ch> | 2016-08-15 03:02:38 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-15 10:25:12 +0300 |
commit | 90844f00049e9f42573fd31d7c32e8fd31d3fd07 (patch) | |
tree | 60303fd6ee2cb480548f847790090e786f5f70fd /drivers/gpu/drm/drm_atomic.c | |
parent | fc93ff608b15ae32cde3006b7af860b59cac20ec (diff) | |
download | linux-90844f00049e9f42573fd31d7c32e8fd31d3fd07.tar.xz |
drm: make drm_get_format_name thread-safe
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
[danvet: Clarify that the returned pointer must be freed with
kfree().]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index fa3930757972..087391f08a69 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -837,8 +837,9 @@ static int drm_atomic_plane_check(struct drm_plane *plane, /* Check whether this plane supports the fb pixel format. */ ret = drm_plane_check_pixel_format(plane, state->fb->pixel_format); if (ret) { - DRM_DEBUG_ATOMIC("Invalid pixel format %s\n", - drm_get_format_name(state->fb->pixel_format)); + const 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; } |