From: Daniel Vetter Date: Wed, 14 Aug 2013 22:02:35 +0000 (+0200) Subject: drm/gem: remove bogus NULL check from drm_gem_object_handle_unreference_unlocked X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bc505b86ae9d4ab45464e3e3c0ab8992d6a5aff;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/gem: remove bogus NULL check from drm_gem_object_handle_unreference_unlocked Calling this function with a NULL object is simply a bug, so papering over a NULL object not a good idea. Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index f3c1bbcf807f..44978bcf8125 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -238,9 +238,6 @@ static void drm_gem_object_handle_free(struct drm_gem_object *obj) void drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj) { - if (obj == NULL) - return; - if (atomic_read(&obj->handle_count) == 0) return;