Re: [PATCH] drm/i915/bios: Move a variable assignment behind a null pointer check in intel_bios_encoder_supports_dp_dual_mode()
Dan Carpenter <[email protected]> Tue, 14 Jul 2026 18:46:06 +0300
| Newsgroups | org.kernel.vger.kernel-janitors,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 14, 2026 at 11:28:23AM -0400, Rodrigo Vivi wrote: > On Mon, Jul 13, 2026 at 04:05:53PM +0200, Markus Elfring wrote: > > From: Markus Elfring <[email protected]> > > Date: Mon, 13 Jul 2026 15:56:46 +0200 > > > > The address of a data structure member was determined before > > a corresponding null pointer check in the implementation of > > the function “intel_bios_encoder_supports_dp_dual_mode”. > > > > Thus avoid the risk for undefined behaviour by reducing the scope for > > the variable “child” behind condition checks. > > > > This issue was detected by using the Coccinelle software. > > > > Fixes: 044cbc7a74c136f12a80c855cadd1b085084aef1 ("drm/i915/bios: Nuke DEVICE_TYPE_DP_DUAL_MODE_BITS") > > Cc: [email protected] Please stop adding Fixes tags to these and talking about "undefined behavior" in the commit message. Pointer math is defined... It's just a style preference on your part. regards, dan carpenter