[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1326095463-8545-1-git-send-email-Julia.Lawall@lip6.fr>
Date: Mon, 9 Jan 2012 08:51:03 +0100
From: Julia Lawall <Julia.Lawall@...6.fr>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: kernel-janitors@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Julia Lawall <julia@...u.dk>
Subject: [PATCH] drivers/staging/omapdrm/omap_fbdev.c: move free after uses
From: Julia Lawall <julia@...u.dk>
Move the free after the final uses.
The semantic patch that makes this report is available
in scripts/coccinelle/free/kfree.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Julia Lawall <julia@...u.dk>
---
drivers/staging/omapdrm/omap_fbdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/omapdrm/omap_fbdev.c b/drivers/staging/omapdrm/omap_fbdev.c
index 093ae2f..c64b87c 100644
--- a/drivers/staging/omapdrm/omap_fbdev.c
+++ b/drivers/staging/omapdrm/omap_fbdev.c
@@ -362,11 +362,11 @@ void omap_fbdev_free(struct drm_device *dev)
fbdev = to_omap_fbdev(priv->fbdev);
- kfree(fbdev);
-
/* this will free the backing object */
if (fbdev->fb)
fbdev->fb->funcs->destroy(fbdev->fb);
+ kfree(fbdev);
+
priv->fbdev = NULL;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists