提交 a9e8d70c 编写于 作者: J Julia Lawall 提交者: Greg Kroah-Hartman

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: NJulia Lawall <julia@diku.dk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6b8ca4cf
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册