mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 14:06:51 +07:00
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>
This commit is contained in:
parent
6b8ca4cf53
commit
a9e8d70c1a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user