intel/i945: don't read structs out of uninitialized pointers

Change-Id: I7f17cd1418f05ff3e8cd559eca6ec3ce7f9bfb79
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11139
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2015-08-08 22:02:12 +02:00 committed by Patrick Georgi
parent 3254ed8607
commit 54e227efdf
1 changed files with 3 additions and 0 deletions

View File

@ -496,6 +496,9 @@ intel_gma_get_controller_info(void)
return NULL;
}
struct northbridge_intel_i945_config *chip = dev->chip_info;
if (!chip) {
return NULL;
}
return &chip->gfx;
}