[bug report] drm/pl111: Replace custom connector with panel bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Linus Walleij,

This is a semi-automatic email about new static checker warnings.

The patch 001485d5255c: "drm/pl111: Replace custom connector with
panel bridge" from Sep 8, 2017, leads to the following Smatch
complaint:

    drivers/gpu/drm/pl111/pl111_drv.c:130 pl111_modeset_init()
    error: we previously assumed 'panel' could be null (see line 103)

drivers/gpu/drm/pl111/pl111_drv.c
   102			return ret;
   103		if (panel) {
                    ^^^^^
Patch adds new check

   104			bridge = drm_panel_bridge_add(panel,
   105						      DRM_MODE_CONNECTOR_Unknown);
   106			if (IS_ERR(bridge)) {
   107				ret = PTR_ERR(bridge);
   108				goto out_config;
   109			}
   110			/*
   111			 * TODO: when we are using a different bridge than a panel
   112			 * (such as a dumb VGA connector) we need to devise a different
   113			 * method to get the connector out of the bridge.
   114			 */
   115		}
   116	
   117		ret = pl111_display_init(dev);
   118		if (ret != 0) {
   119			dev_err(dev->dev, "Failed to init display\n");
   120			goto out_bridge;
   121		}
   122	
   123		ret = drm_simple_display_pipe_attach_bridge(&priv->pipe,
   124							    bridge);
   125		if (ret)
   126			return ret;
   127	
   128		priv->bridge = bridge;
   129		priv->panel = panel;
   130		priv->connector = panel->connector;
                                  ^^^^^^^^^^^^^^^^
but it also adds a new dereference.

   131	
   132		ret = drm_vblank_init(dev, 1);

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux