From: jsg Date: Thu, 4 Apr 2024 08:00:22 +0000 (+0000) Subject: drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=818037a2aba5d127ae9667acca04acbd20ea6e9d;p=openbsd 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 --- 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;