All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: linus.walleij@linaro.org
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/mcde: Add new driver for ST-Ericsson MCDE
Date: Wed, 29 May 2019 14:06:49 +0300	[thread overview]
Message-ID: <20190529110649.GC19119@mwanda> (raw)

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-05-29 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 11:06 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-29 11:32 [bug report] drm/mcde: Add new driver for ST-Ericsson MCDE Dan Carpenter
2019-05-29 14:05 ` Linus Walleij
2019-05-29 11:35 Dan Carpenter
2020-08-31 11:39 Dan Carpenter
2020-09-12 10:29 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529110649.GC19119@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.