提交 da777721 编写于 作者: P Peter Ujfalusi 提交者: 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: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册