From 818037a2aba5d127ae9667acca04acbd20ea6e9d Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 4 Apr 2024 08:00:22 +0000 Subject: [PATCH] drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode() From Ville Syrjala a891add409e3bc381f4f68c2ce9d953f1865cb1f in linux-6.6.y/6.6.24 32e39bab59934bfd3f37097d4dd85ac5eb0fd549 in mainline linux --- sys/dev/pci/drm/i915/display/intel_bios.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/i915/display/intel_bios.c b/sys/dev/pci/drm/i915/display/intel_bios.c index 354bc55e1ba..4be57bc4242 100644 --- a/sys/dev/pci/drm/i915/display/intel_bios.c +++ b/sys/dev/pci/drm/i915/display/intel_bios.c @@ -3330,6 +3330,9 @@ bool intel_bios_encoder_supports_dp_dual_mode(const struct intel_bios_encoder_da { const struct child_device_config *child = &devdata->child; + if (!devdata) + return false; + if (!intel_bios_encoder_supports_dp(devdata) || !intel_bios_encoder_supports_hdmi(devdata)) return false; -- 2.20.1