]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/display: use ERR_PTR on DP tunnel manager creation fail
authorKrzysztof Karas <krzysztof.karas@intel.com>
Thu, 12 Dec 2024 11:00:41 +0000 (11:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Dec 2024 13:02:09 +0000 (14:02 +0100)
commitd9369f0c9f9531dbfce318e1766148f8ac7205dc
treef7a6c6aa8fe5ddf2e8af5b917017b6534f514a5e
parenteed704d8ab6782f90d2bdd6eb892542180730981
drm/display: use ERR_PTR on DP tunnel manager creation fail

commit 080b2e7b5e9ad23343e4b11f0751e4c724a78958 upstream.

Instead of returning a generic NULL on error from
drm_dp_tunnel_mgr_create(), use error pointers with informative codes
to align the function with stub that is executed when
CONFIG_DRM_DISPLAY_DP_TUNNEL is unset. This will also trigger IS_ERR()
in current caller (intel_dp_tunnerl_mgr_init()) instead of bypassing it
via NULL pointer.

v2: use error codes inside drm_dp_tunnel_mgr_create() instead of handling
 on caller's side (Michal, Imre)

v3: fixup commit message and add "CC"/"Fixes" lines (Andi),
 mention aligning function code with stub

Fixes: 91888b5b1ad2 ("drm/i915/dp: Add support for DP tunnel BW allocation")
Cc: Imre Deak <imre.deak@intel.com>
Cc: <stable@vger.kernel.org> # v6.9+
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7q4fpnmmztmchczjewgm6igy55qt6jsm7tfd4fl4ucfq6yg2oy@q4lxtsu6445c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/display/drm_dp_tunnel.c