Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6204a58 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent f9b34a0f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -303,6 +303,7 @@ 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() */
	if (fbdev->bo)
		omap_gem_unpin(fbdev->bo);
		omap_gem_unpin(fbdev->bo);


	/* this will free the backing object */
	/* this will free the backing object */