From: Peter Ujfalusi Date: Fri, 15 Dec 2017 14:08:31 +0000 (+0200) Subject: drm/omap: Init fbdev emulation only when we have displays X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=da77772172059e609ef5135881df55e3e6c5c808;p=linux.git 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: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index be94480326d7f..0f66c74a54b0e 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -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;