Skip to content

Commit

Permalink
drivers/staging/omapdrm/omap_fbdev.c: move free after uses
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Greg Kroah-Hartman committed Feb 8, 2012
1 parent 6b8ca4c commit a9e8d70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/omapdrm/omap_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit a9e8d70

Please sign in to comment.