Skip to content

Commit

Permalink
drm/atomic: Don't try to free a NULL state
Browse files Browse the repository at this point in the history
Consistently with other free functions, handle the NULL case without
oopsing.

Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ander Conselvan de Oliveira authored and Daniel Vetter committed Mar 30, 2015
1 parent 8a5c0bd commit a0211bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/drm_atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ EXPORT_SYMBOL(drm_atomic_state_clear);
*/
void drm_atomic_state_free(struct drm_atomic_state *state)
{
if (!state)
return;

drm_atomic_state_clear(state);

DRM_DEBUG_ATOMIC("Freeing atomic state %p\n", state);
Expand Down

0 comments on commit a0211bb

Please sign in to comment.