drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()
authorjsg <jsg@openbsd.org>
Thu, 4 Apr 2024 08:00:22 +0000 (08:00 +0000)
committerjsg <jsg@openbsd.org>
Thu, 4 Apr 2024 08:00:22 +0000 (08:00 +0000)
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

index 354bc55..4be57bc 100644 (file)
@@ -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;