Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35904 )
Change subject: soc/nvidia/tegra124: Fix null pointer dereference ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35904/1/src/soc/nvidia/tegra124/spi... File src/soc/nvidia/tegra124/spi.c:
https://review.coreboot.org/c/coreboot/+/35904/1/src/soc/nvidia/tegra124/spi... PS1, Line 291: if (dma) { I might have done
if (!dma) { printk(); return; }
https://review.coreboot.org/c/coreboot/+/35904/1/src/soc/nvidia/tegra124/spi... PS1, Line 564: while ((read32(&spi->dma_out->regs->dma_byte_sta) < todo) || The value 'todo' changes here, so this commit is no longer just a NULL check. My first guess is your change is correct though..
https://review.coreboot.org/c/coreboot/+/35904/1/src/soc/nvidia/tegra124/spi... PS1, Line 566: spi_delay(spi, todo - spi_byte_count(spi)); I would like to see braces with this 'while'.