coreboot-kgpe-d16/src
Jacob Garber 61a2d25a01 soc/nvidia/tegra124: Fix null pointer and logic bug
Commit 680027edf6 fixed a null dereference and logic bug in the tegra210
spi code:

    soc/nvidia/tegra210: Fix potential NULL pointer dereference

    Recent Coverity scan indicated potential NULL deference; if either
    spi->dma_in or spi->dma_out are NULL, the fifo_error() check could
    dereference a NULL pointer.

    Also fixed what appears to be a logic bug for the spi->dma_out case,
    where it was using the todo (count) from spi->dma_in.

Coverity is warning about the same problem for tegra124, so apply the
same fix there. Also, add braces around a while statement.

Change-Id: I6a7403417ee83b703cf4ca495129f73c66691ea9
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 124183, 124185
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35904
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-10-22 20:08:20 +00:00
..
acpi AUTHORS: Move src/acpi copyrights into AUTHORS file 2019-07-30 11:04:14 +00:00
arch src: Remove unused 'include <string.h>' 2019-10-20 17:19:34 +00:00
commonlib cbmem: Add IDs for TSEG and BERT table data 2019-10-20 16:46:07 +00:00
console postcar: Fix linking error with disabled postcar console 2019-10-16 11:38:23 +00:00
cpu cpu/amd/{agesa,pi}: Select NO_FIXED_XIP_ROM_SIZE 2019-10-17 15:11:41 +00:00
device src/{device,drivers,mb,nb,soc,sb}: Remove unused 'include <console/console.h>' 2019-10-21 14:21:09 +00:00
drivers AUTHORS: Move src/drivers/[l*-v*] copyrights into AUTHORS file 2019-10-22 12:55:19 +00:00
ec ec/acpi/ec.c Link EC code in bootblock & verstage 2019-10-12 12:57:04 +00:00
include src/{device,drivers,mb,nb,soc,sb}: Remove unused 'include <console/console.h>' 2019-10-21 14:21:09 +00:00
lib fmap: Add get_fmap_flash_offset() 2019-09-27 21:59:44 +00:00
mainboard mb/lenovo/t410/gpio: Use static for const structures 2019-10-22 20:06:53 +00:00
northbridge src/{device,drivers,mb,nb,soc,sb}: Remove unused 'include <console/console.h>' 2019-10-21 14:21:09 +00:00
security security/memory: Add x86_64 support 2019-10-20 11:30:47 +00:00
soc soc/nvidia/tegra124: Fix null pointer and logic bug 2019-10-22 20:08:20 +00:00
southbridge sb/intel/i82801gx: Set FERR# Mux Enable only on mobile platforms 2019-10-22 20:07:11 +00:00
superio src: Remove unused 'include <string.h>' 2019-10-20 17:19:34 +00:00
vendorcode vc/amd/agesa/f16kb: Cast to UINT64 to avoid overflow 2019-10-22 12:51:36 +00:00
Kconfig arch/x86: Add a choice for selecting normal/fallback cbfs prefix 2019-10-08 11:40:25 +00:00