]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/omap: fix omap_fbdev_free() when omap_fbdev_create() wasn't called
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 9 Feb 2018 07:30:44 +0000 (09:30 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 1 Mar 2018 07:18:18 +0000 (09:18 +0200)
commite6204a58b9e9ad01ab9c6d4b8b2b8b9c4e38bbba
treee3cbd9eef09a592bcf3e25438d6f3edf61e19954
parentf9b34a0fa4e25d9c0b72f124680c37c0c38f9934
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>
drivers/gpu/drm/omapdrm/omap_fbdev.c