diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2015-03-30 14:05:43 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-30 17:52:09 +0300 |
commit | a0211bb482c346820506c546a6a58b8357999a99 (patch) | |
tree | aa31defb713405879429c1aa9b96a92ba2970462 /drivers/gpu/drm/drm_atomic.c | |
parent | 8a5c0bde54ca0354ae8b7e9d37d17bc514aa6c42 (diff) | |
download | linux-a0211bb482c346820506c546a6a58b8357999a99.tar.xz |
drm/atomic: Don't try to free a NULL state
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>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 00ea88151c01..57efdbeff008 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -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); |