FROMLIST: 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: 7eacba9a ("drm/mediatek: dp: Add .wait_hpd_asserted() for AUX bus") Signed-off-by:Douglas Anderson <dianders@chromium.org> (am from https://patchwork.kernel.org/patch/13942094/) (also found at https://lore.kernel.org/r/20250116094249.1.I29b0b621abb613ddc70ab4996426a3909e1aa75f@changeid) UPSTREAM-TASK=b:391646448 BUG=b:390455848 TEST=Put printout in non-error case and see crash fixed Change-Id: I29b0b621abb613ddc70ab4996426a3909e1aa75f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/6191527 Commit-Queue: Douglas Anderson <dianders@chromium.org> Reviewed-by:
Sean Paul <sean@poorly.run> Commit-Queue: Stephen Boyd <swboyd@chromium.org> Tested-by:
Douglas Anderson <dianders@chromium.org> Auto-Submit: Douglas Anderson <dianders@chromium.org> Reviewed-by:
Stephen Boyd <swboyd@chromium.org> Signed-off-by:
Hubert Mazur <hmazur@google.com>
Loading
Please sign in to comment