diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2015-03-30 07:05:43 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-30 10:52:09 -0400 |
commit | a0211bb482c346820506c546a6a58b8357999a99 (patch) | |
tree | aa31defb713405879429c1aa9b96a92ba2970462 /drivers | |
parent | 8a5c0bde54ca0354ae8b7e9d37d17bc514aa6c42 (diff) |
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')
-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); | |||
173 | */ | 173 | */ |
174 | void drm_atomic_state_free(struct drm_atomic_state *state) | 174 | void drm_atomic_state_free(struct drm_atomic_state *state) |
175 | { | 175 | { |
176 | if (!state) | ||
177 | return; | ||
178 | |||
176 | drm_atomic_state_clear(state); | 179 | drm_atomic_state_clear(state); |
177 | 180 | ||
178 | DRM_DEBUG_ATOMIC("Freeing atomic state %p\n", state); | 181 | DRM_DEBUG_ATOMIC("Freeing atomic state %p\n", state); |