mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 14:14:54 +00:00
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: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
f9b34a0fa4
commit
e6204a58b9
1 changed files with 2 additions and 1 deletions
|
@ -303,7 +303,8 @@ void omap_fbdev_free(struct drm_device *dev)
|
|||
fbdev = to_omap_fbdev(priv->fbdev);
|
||||
|
||||
/* 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 */
|
||||
if (fbdev->fb)
|
||||
|
|
Loading…
Add table
Reference in a new issue