Commit 106a6de
drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr
The function mtk_dp_wait_hpd_asserted() may be called before the
`mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach().
Specifically it can be called via this callpath:
- mtk_edp_wait_hpd_asserted
- [panel probe]
- dp_aux_ep_probe
Using "drm" level prints anywhere in this callpath causes a NULL
pointer dereference. Change the error message directly in
mtk_dp_wait_hpd_asserted() to dev_err() to avoid this. Also change the
error messages in mtk_dp_parse_capabilities(), which is called by
mtk_dp_wait_hpd_asserted().
While touching these prints, also add the error code to them to make
future debugging easier.
Fixes: 7eacba9 ("drm/mediatek: dp: Add .wait_hpd_asserted() for AUX bus")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20250116094249.1.I29b0b621abb613ddc70ab4996426a3909e1aa75f@changeid/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>1 parent 4ba973c commit 106a6de
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1766 | 1766 | | |
1767 | 1767 | | |
1768 | 1768 | | |
1769 | | - | |
| 1769 | + | |
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
| |||
1776 | 1776 | | |
1777 | 1777 | | |
1778 | 1778 | | |
1779 | | - | |
| 1779 | + | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
| |||
2059 | 2059 | | |
2060 | 2060 | | |
2061 | 2061 | | |
2062 | | - | |
| 2062 | + | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | 2065 | | |
| |||
0 commit comments