From: Archit Taneja <architt@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [bug report] drm/msm/dsi: Move PHY operations out of host
Date: Mon, 13 Feb 2017 10:59:31 +0530 [thread overview]
Message-ID: <f18bb081-38f7-1d30-f758-9203b56fcf19@codeaurora.org> (raw)
In-Reply-To: <20170211051735.GA16817@mwanda>
On 02/11/2017 10:47 AM, Dan Carpenter wrote:
> 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.
This looks like a typo, it should have been msm_dsi->host. Will post a patch
to fix this.
Thanks,
Archit
>
> 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
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-02-13 5:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 5:17 [bug report] drm/msm/dsi: Move PHY operations out of host Dan Carpenter
2017-02-13 5:29 ` Archit Taneja [this message]
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=f18bb081-38f7-1d30-f758-9203b56fcf19@codeaurora.org \
--to=architt@codeaurora.org \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.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.