-
由 Maxime Ripard 提交于
Commit 5ea6b170 ("drm/panel: Add prepare_prev_first flag to drm_panel") introduced an access to the bridge pointer in the devm_drm_panel_bridge_add_typed() function. However, due to the unusual ERR_PTR check when getting that pointer, the pointer access is done even though the pointer might be an error pointer. Rework the function for a more traditional design that will return immediately if it gets an ERR_PTR so that we never access the pointer in that case. Fixes: 5ea6b170 ("drm/panel: Add prepare_prev_first flag to drm_panel") Reported-by: Nkernel test robot <lkp@intel.com> Reported-by: NDan Carpenter <error27@gmail.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: NAndrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20230102120123.19062-1-maxime@cerno.tech Link: https://patchwork.freedesktop.org/patch/msgid/20230102120123.19062-1-maxime@cerno.tech
8dd4e8c4