Hello everyone,

My name is Shaobo He and I am a graduate student at University of Utah. I am using a static analysis tool to search for null pointer dereferences and came across a potentially invalid memory access in the file drivers/gpu/drm/i915/intel_crt.c: in function `intel_crt_detect_ddc`, function `intel_gmbus_get_adapter` can return a NULL pointer which is dereferenced by the call to `drm_get_edid` or `intel_gmbus_is_forced_bit`. It seems that the return value of `intel_gmbus_get_adapter` is never NULL-checked. If so, it would be better to replace the branch to return a NULL pointer with something like `BUG_ON`.

Please let me know if it makes sense. I am looking forward to your reply.

Best,
Shaobo
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to