From patchwork Wed Jul 17 13:07:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Egbert Eich X-Patchwork-Id: 2828593 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 6280F9F967 for ; Wed, 17 Jul 2013 13:15:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 338E120186 for ; Wed, 17 Jul 2013 13:15:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D83B20182 for ; Wed, 17 Jul 2013 13:14:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7DF70E6F14 for ; Wed, 17 Jul 2013 06:14:55 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by gabe.freedesktop.org (Postfix) with ESMTP id 50CEFE5EC9 for ; Wed, 17 Jul 2013 06:07:55 -0700 (PDT) Received: from debian (p5DCF2FCF.dip0.t-ipconnect.de [93.207.47.207]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0LgXxN-1UKtVJ0raf-00nxW0; Wed, 17 Jul 2013 15:07:48 +0200 Received: from sles11.fritz.box (sles11.fritz.box [192.168.178.22]) by debian (Postfix) with ESMTP id 9EE8E47ED; Wed, 17 Jul 2013 15:07:46 +0200 (CEST) From: Egbert Eich To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/16] drm/mgag200: Free container instead of member in mga_user_framebuffer_destroy() Date: Wed, 17 Jul 2013 15:07:16 +0200 Message-Id: <1374066449-21714-4-git-send-email-eich@suse.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374066449-21714-1-git-send-email-eich@suse.com> References: <1374066449-21714-1-git-send-email-eich@suse.com> X-Provags-ID: V02:K0:fbxCbmXsEmGZ0ThYYB1+cliv6OQghkF1Z3biMFLacQr RT4C5BTBi8jCp03bRh8Z6fKKU5fOpJHNy7GC7d4UcQIdXy5FlB EtR7w2gSp/9S14oIChv337q/ojI1ZJsZi9rWhLR/l5CEniZVMK ndJVDQVNNKLTffgHOFqMXGkzFXMhaQE2F34cOhaNqKnYO8sY2G zg7u/0NX0DAYXYMsJ6UcGR+1gHa52bUSJ2noWX7RBbnZrMV8Ip c7OzkL1LOPwwlOfUhTkOm/d91awM+ZJOEj96YC2gt4RRNSPAS7 E/VTck5dI9F7LpbfF/cSEyvUs+hdYlTijcwpRRKRu8cWa7rGfz FuGruduQAl8U14GeFYntWpRNR6hqJIOJGgqUXSwiJ Cc: Egbert Eich , Egbert Eich , Mathieu Larouche , Dave Airlie , Christopher Harvey 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=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 Technically freeing mga_fb->base is the same as freeing mga_fb as 'base' the first member of the data structure. Still this makes it cleaner. Signed-off-by: Egbert Eich --- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index 9fa5685..43ebf8d 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -20,7 +20,7 @@ static void mga_user_framebuffer_destroy(struct drm_framebuffer *fb) if (mga_fb->obj) drm_gem_object_unreference_unlocked(mga_fb->obj); drm_framebuffer_cleanup(fb); - kfree(fb); + kfree(mga_fb); } static const struct drm_framebuffer_funcs mga_fb_funcs = {