From patchwork Wed Aug 14 22:02:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2844822 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3032E9F271 for ; Wed, 14 Aug 2013 22:13:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 666A420638 for ; Wed, 14 Aug 2013 22:13:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 90DF52063E for ; Wed, 14 Aug 2013 22:13:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65F67E697A for ; Wed, 14 Aug 2013 15:13:53 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by gabe.freedesktop.org (Postfix) with ESMTP id AAAEFE66EF for ; Wed, 14 Aug 2013 15:03:08 -0700 (PDT) Received: by mail-ee0-f53.google.com with SMTP id b15so11104eek.26 for ; Wed, 14 Aug 2013 15:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v6DJOuKa5G7XYgtLaVYbAsAvtVy8o0oT/ssXjh+79vY=; b=eVvg2Flfps6hLEDLaEjWv+N+BfroAz9y1J2psevXY7zvSBHNv00xtxehVK3dZZKxZb HhkKLm+eMYxzWwAJuqlznmUQKBMr86DQ9GAsgFQmmQx0HDDlLR0AUY7U7CULV1mVm5z/ p7Y/N/VwgwkZYf1RnIl9wim9E1mkrpFwZ4pEM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v6DJOuKa5G7XYgtLaVYbAsAvtVy8o0oT/ssXjh+79vY=; b=gga1LDG8kmA72+zeDCtKYDKuPGM0za3QxhO9+XawTzewkZoJCl/AHw49sYHsf2b+8m Ja+yo7C275qNxlB/QPUbhihpY1FRV7rVI8FLK9VrJIp6xLefDQ7kBCUN4zSXzdWCA5Ks Lc1ezVJVwYiYXoDjVDaBejAYgMwaMm3U73DVP05kPuApNxkHAc4Avf6leWD9a/Me4W1R 66HtyJCC8cuHc3O+xo1x/TteWU3/vCv7a6yYWEE9DvQ3R/rU3J5fwsL/WpfbMhxNioKr Scw75XQQPF2JtmOX8g7L1jynMh5VI50qf6btSzodLMK+701oiooBGvY1VFlRAoI8BTtp DGVg== X-Gm-Message-State: ALoCoQnxIC8lj4kmoCU8ryqLKLs/10HDBD+uef+Sghc6dWFHDSEsivOoNe3ZX9t+Ey/AXTvfBC9N X-Received: by 10.14.110.194 with SMTP id u42mr63400eeg.112.1376517787836; Wed, 14 Aug 2013 15:03:07 -0700 (PDT) Received: from aaron.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id m54sm78874820eex.2.2013.08.14.15.03.06 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 15:03:07 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development , DRI Development Subject: [PATCH 06/20] drm/gem: remove bogus NULL check from drm_gem_object_handle_unreference_unlocked Date: Thu, 15 Aug 2013 00:02:35 +0200 Message-Id: <1376517769-7171-7-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1376517769-7171-1-git-send-email-daniel.vetter@ffwll.ch> References: <1376517769-7171-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/drm_gem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 77c7d19..b1d9e25 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;