From patchwork Sat Dec 10 05:26:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 5569 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0998223E04 for ; Sat, 10 Dec 2011 05:26:15 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id ECFE4A18160 for ; Sat, 10 Dec 2011 05:26:14 +0000 (UTC) Received: by mail-bw0-f52.google.com with SMTP id 17so5065321bke.11 for ; Fri, 09 Dec 2011 21:26:14 -0800 (PST) Received: by 10.204.156.208 with SMTP id y16mr5411167bkw.72.1323494774723; Fri, 09 Dec 2011 21:26:14 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs126010bkc; Fri, 9 Dec 2011 21:26:14 -0800 (PST) Received: by 10.101.9.2 with SMTP id m2mr2552493ani.78.1323494772333; Fri, 09 Dec 2011 21:26:12 -0800 (PST) Received: from mail-gy0-f178.google.com (mail-gy0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id n2si1569192ybl.12.2011.12.09.21.26.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 21:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by ghrr1 with SMTP id r1so3027404ghr.37 for ; Fri, 09 Dec 2011 21:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=9NFNqZniqoZ0hAQJ3iERdH6QDQFq2hQeBqd4S4x3Jo0=; b=tONB5esn2fWknkc2apjWwU3gWg6P23JR/K6lRk0aIT1lkHgsR/SQh4zpvgdbO6qgKh rmINBNL1ctEu0rw4jyDKITwdgk15Amy2soQgQYuD7hpJ/Gsq5SF1yEmEXs8hGAe8c8tu nj93D5WnAC5h0TXQm66Vf2bXFI/UBfJ7ccKRY= Received: by 10.236.153.42 with SMTP id e30mr16482422yhk.10.1323494771696; Fri, 09 Dec 2011 21:26:11 -0800 (PST) Received: from localhost (ppp-70-253-156-7.dsl.rcsntx.swbell.net. [70.253.156.7]) by mx.google.com with ESMTPS id i50sm18932844yhk.11.2011.12.09.21.26.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 21:26:11 -0800 (PST) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Rob Clark Subject: [PATCH 2/3] drm/omap: crtc/encoder/fb destroy cleanups Date: Fri, 9 Dec 2011 23:26:07 -0600 Message-Id: <1323494768-11509-2-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1323494768-11509-1-git-send-email-rob.clark@linaro.org> References: <1323494768-11509-1-git-send-email-rob.clark@linaro.org> From: Rob Clark Signed-off-by: Rob Clark --- drivers/staging/omapdrm/omap_crtc.c | 3 +-- drivers/staging/omapdrm/omap_encoder.c | 3 +-- drivers/staging/omapdrm/omap_fb.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c index fd09bcf..cffdf5e 100644 --- a/drivers/staging/omapdrm/omap_crtc.c +++ b/drivers/staging/omapdrm/omap_crtc.c @@ -320,8 +320,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, fail: if (crtc) { - drm_crtc_cleanup(crtc); - kfree(omap_crtc); + omap_crtc_destroy(crtc); } return NULL; } diff --git a/drivers/staging/omapdrm/omap_encoder.c b/drivers/staging/omapdrm/omap_encoder.c index 83bacd8..06c52cb 100644 --- a/drivers/staging/omapdrm/omap_encoder.c +++ b/drivers/staging/omapdrm/omap_encoder.c @@ -164,8 +164,7 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev, fail: if (encoder) { - drm_encoder_cleanup(encoder); - kfree(omap_encoder); + omap_encoder_destroy(encoder); } return NULL; diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c index 491be53..3f62505 100644 --- a/drivers/staging/omapdrm/omap_fb.c +++ b/drivers/staging/omapdrm/omap_fb.c @@ -53,11 +53,9 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb) drm_framebuffer_cleanup(fb); - if (omap_gem_put_paddr(omap_fb->bo)) { - dev_err(dev->dev, "could not unmap!\n"); - } - if (omap_fb->bo) { + if (omap_fb->paddr && omap_gem_put_paddr(omap_fb->bo)) + dev_err(dev->dev, "could not unmap!\n"); drm_gem_object_unreference_unlocked(omap_fb->bo); }