John Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39260 )
Change subject: soc/intel/tigerlake: Avoid NULL pointer dereference ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39260/1/src/soc/intel/tigerlake/fsp... File src/soc/intel/tigerlake/fsp_params_jsl.c:
https://review.coreboot.org/c/coreboot/+/39260/1/src/soc/intel/tigerlake/fsp... PS1, Line 163: dev
If dev is NULL you are still accessing a NULL pointer here and on line 165.
Ack
https://review.coreboot.org/c/coreboot/+/39260/1/src/soc/intel/tigerlake/fsp... PS1, Line 161: if (!dev) { : if (!xdci_can_enable()) : dev->enabled = 0; : : params->XdciEnable = dev->enabled; : }
This is still not correct. You are accessing dev if it is NULL.
Ack