[bug report] drm/mcde: Add new driver for ST-Ericsson MCDE

Dan Carpenter dan.carpenter at oracle.com
Wed May 29 11:32:31 UTC 2019


Hello Linus Walleij,

The patch 5fc537bfd000: "drm/mcde: Add new driver for ST-Ericsson
MCDE" from May 24, 2019, leads to the following static checker
warning:

	drivers/gpu/drm/mcde/mcde_drv.c:488 mcde_probe()
	error: uninitialized symbol 'match'.

drivers/gpu/drm/mcde/mcde_drv.c
   470          writel(0xFFFFFFFF, mcde->regs + MCDE_RISERR);
   471  
   472          /* Spawn child devices for the DSI ports */
   473          devm_of_platform_populate(dev);
   474  
   475          /* Create something that will match the subdrivers when we bind */
   476          for (i = 0; i < ARRAY_SIZE(mcde_component_drivers); i++) {
   477                  struct device_driver *drv = &mcde_component_drivers[i]->driver;
   478                  struct device *p = NULL, *d;
   479  
   480                  while ((d = bus_find_device(&platform_bus_type, p, drv,
   481                                              (void *)platform_bus_type.match))) {
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The concern would be that this condintion is never met.  I suspet that's
not possible?

   482                          put_device(p);
   483                          component_match_add(dev, &match, mcde_compare_dev, d);
   484                          p = d;
   485                  }
   486                  put_device(p);
   487          }
   488          if (IS_ERR(match)) {
   489                  dev_err(dev, "could not create component match\n");
   490                  ret = PTR_ERR(match);
   491                  goto clk_disable;
   492          }
   493          ret = component_master_add_with_match(&pdev->dev, &mcde_drm_comp_ops,
   494                                                match);
   495          if (ret) {

regards,
dan carpenter


More information about the dri-devel mailing list