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

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev)
	struct drm_fb_helper *helper;
	int ret = 0;

	if (!priv->num_crtcs || !priv->num_connectors)
		return;

	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
	if (!fbdev)
		goto fail;