Commit da777721 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Tomi Valkeinen

drm/omap: Init fbdev emulation only when we have displays

Do not try to init the fbdev if either num_crtcs or num_connectors is 0.
In this case we do not have display so the fbdev init would fail anyways.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent efd1f06b
...@@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev) ...@@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev)
struct drm_fb_helper *helper; struct drm_fb_helper *helper;
int ret = 0; int ret = 0;
if (!priv->num_crtcs || !priv->num_connectors)
return;
fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
if (!fbdev) if (!fbdev)
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment