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

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

 



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_dsi.c:917 mcde_dsi_bind()
	warn: 'bridge' isn't an ERR_PTR

drivers/gpu/drm/mcde/mcde_dsi.c
   882          /* Obtain the clocks */
   883          d->hs_clk = devm_clk_get(dev, "hs");
   884          if (IS_ERR(d->hs_clk)) {
   885                  dev_err(dev, "unable to get HS clock\n");
   886                  return PTR_ERR(d->hs_clk);
   887          }
   888  
   889          d->lp_clk = devm_clk_get(dev, "lp");
   890          if (IS_ERR(d->lp_clk)) {
   891                  dev_err(dev, "unable to get LP clock\n");
   892                  return PTR_ERR(d->lp_clk);
   893          }
   894  
   895          /* Assert RESET through the PRCMU, active low */
   896          /* FIXME: which DSI block? */
   897          regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET,
   898                             PRCM_DSI_SW_RESET_DSI0_SW_RESETN, 0);
   899  
   900          usleep_range(100, 200);
   901  
   902          /* De-assert RESET again */
   903          regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET,
   904                             PRCM_DSI_SW_RESET_DSI0_SW_RESETN,
   905                             PRCM_DSI_SW_RESET_DSI0_SW_RESETN);
   906  
   907          /* Start up the hardware */
   908          mcde_dsi_start(d);
   909  
   910          /* Look for a panel as a child to this node */
   911          for_each_available_child_of_node(dev->of_node, child) {
   912                  panel = of_drm_find_panel(child);
   913                  if (IS_ERR(panel)) {
   914                          dev_err(dev, "failed to find panel try bridge (%lu)\n",
   915                                  PTR_ERR(panel));
   916                          bridge = of_drm_find_bridge(child);
   917                          if (IS_ERR(bridge)) {

of_drm_find_bridge() returns NULL on error, not error pointers.

   918                                  dev_err(dev, "failed to find bridge (%lu)\n",
   919                                          PTR_ERR(bridge));
                                                ^^^^^^^^^^^^^^^
   920                                  return PTR_ERR(bridge);
                                               ^^^^^^^^^^^^^^^
Should this be -EPROBEDEFER?  I'm not sure of the rules.

   921                          }
   922                  }
   923          }

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