diff options
author | Julia Lawall <julia@diku.dk> | 2012-01-09 08:51:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-08 14:14:12 -0800 |
commit | a9e8d70c1ac6c9ccf6852c91e082e28249564e6e (patch) | |
tree | f3665e0f3bb9af917bb3d2508efe8f481966c553 | |
parent | 6b8ca4cf53e04f377944228b66ddc7d5d593e705 (diff) |
drivers/staging/omapdrm/omap_fbdev.c: move free after uses
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@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/omapdrm/omap_fbdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/omapdrm/omap_fbdev.c b/drivers/staging/omapdrm/omap_fbdev.c index ba4530697fe..96940bbfc6f 100644 --- a/drivers/staging/omapdrm/omap_fbdev.c +++ b/drivers/staging/omapdrm/omap_fbdev.c @@ -377,11 +377,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; } |