Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37375 )
Change subject: drivers/spi/flashconsole: Re-add NULL checks ......................................................................
drivers/spi/flashconsole: Re-add NULL checks
Change-Id: I5a90ea9aa3dd510beb6941b000d081944d5a2b95 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M src/drivers/spi/flashconsole.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/37375/1
diff --git a/src/drivers/spi/flashconsole.c b/src/drivers/spi/flashconsole.c index afe3492..98f3cb4 100644 --- a/src/drivers/spi/flashconsole.c +++ b/src/drivers/spi/flashconsole.c @@ -81,6 +81,9 @@
void flashconsole_tx_byte(unsigned char c) { + if (!rdev_ptr) + return; + size_t region_size = region_device_sz(rdev_ptr);
line_buffer[line_offset++] = c; @@ -104,6 +107,9 @@ if (busy) return;
+ if (!rdev_ptr) + return; + busy = 1; region_size = region_device_sz(rdev_ptr); if (offset + len >= region_size)