All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: hali@codeaurora.org
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/msm/dsi: Move PHY operations out of host
Date: Sat, 11 Feb 2017 08:17:35 +0300	[thread overview]
Message-ID: <20170211051735.GA16817@mwanda> (raw)

Hello Hai Li,

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

The patch b62aa70a98c5: "drm/msm/dsi: Move PHY operations out of 
host" from Jan 7, 2017, leads to the following Smatch complaint:

./drivers/gpu/drm/msm/dsi/dsi_manager.c:174 dsi_mgr_phy_enable()
	 error: we previously assumed 'mdsi' could be null (see line 157)

./drivers/gpu/drm/msm/dsi/dsi_manager.c
   156		 */
   157		if (IS_DUAL_DSI() && mdsi && sdsi) {
                                     ^^^^
Check for NULL.

   158			if (!mdsi->phy_enabled && !sdsi->phy_enabled) {
   159				msm_dsi_host_reset_phy(mdsi->host);
   160				msm_dsi_host_reset_phy(sdsi->host);
   161	
   162				ret = enable_phy(mdsi, src_pll_id,
   163						 &shared_timings[DSI_CLOCK_MASTER]);
   164				if (ret)
   165					return ret;
   166				ret = enable_phy(sdsi, src_pll_id,
   167						 &shared_timings[DSI_CLOCK_SLAVE]);
   168				if (ret) {
   169					msm_dsi_phy_disable(mdsi->phy);
   170					return ret;
   171				}
   172			}
   173		} else {
   174			msm_dsi_host_reset_phy(mdsi->host);
                                               ^^^^^^^^^^
Unchecked dereference.

   175			ret = enable_phy(msm_dsi, src_pll_id, &shared_timings[id]);
   176			if (ret)

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

             reply	other threads:[~2017-02-11  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  5:17 Dan Carpenter [this message]
2017-02-13  5:29 ` [bug report] drm/msm/dsi: Move PHY operations out of host Archit Taneja

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=20170211051735.GA16817@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hali@codeaurora.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.