提交 e6204a58 编写于 作者: T Tomi Valkeinen

drm/omap: fix omap_fbdev_free() when omap_fbdev_create() wasn't called

If we have no crtcs/connectors, fbdev init goes fine, but
omap_fbdev_create() is never called. This means that omap_fbdev->bo is
NULL and omap_fbdev_free() crashes.

Add a check to omap_fbdev_free() to handle the NULL case.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
上级 f9b34a0f
...@@ -303,7 +303,8 @@ void omap_fbdev_free(struct drm_device *dev) ...@@ -303,7 +303,8 @@ void omap_fbdev_free(struct drm_device *dev)
fbdev = to_omap_fbdev(priv->fbdev); fbdev = to_omap_fbdev(priv->fbdev);
/* unpin the GEM object pinned in omap_fbdev_create() */ /* unpin the GEM object pinned in omap_fbdev_create() */
omap_gem_unpin(fbdev->bo); if (fbdev->bo)
omap_gem_unpin(fbdev->bo);
/* this will free the backing object */ /* this will free the backing object */
if (fbdev->fb) if (fbdev->fb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册