* [bug report] drm/msm/dsi: Move PHY operations out of host
@ 2017-02-11 5:17 Dan Carpenter
2017-02-13 5:29 ` Archit Taneja
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-02-11 5:17 UTC (permalink / raw)
To: hali; +Cc: dri-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] drm/msm/dsi: Move PHY operations out of host
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
0 siblings, 0 replies; 2+ messages in thread
From: Archit Taneja @ 2017-02-13 5:29 UTC (permalink / raw)
To: Dan Carpenter; +Cc: dri-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-13 5:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.