drm/atomic: Remove unneeded null check for private objects
It can be seen in drm_atomic_get_private_obj_state() that ptr will never be NULL, so skip the check for that case. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170927083532.5756-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -182,9 +182,6 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)
|
||||
for (i = 0; i < state->num_private_objs; i++) {
|
||||
struct drm_private_obj *obj = state->private_objs[i].ptr;
|
||||
|
||||
if (!obj)
|
||||
continue;
|
||||
|
||||
obj->funcs->atomic_destroy_state(obj,
|
||||
state->private_objs[i].state);
|
||||
state->private_objs[i].ptr = NULL;
|
||||
|
Reference in New Issue
Block a user