diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2015-08-08 22:02:12 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-08-10 18:09:04 +0200 |
commit | 54e227efdf2d03d9d0654296f8ac3a379d5cc851 (patch) | |
tree | 4d6ab969af15f44ccdb4d265df6000519c01f135 | |
parent | 3254ed860782ca30a1244d3a016c3bb97caab177 (diff) |
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>
-rw-r--r-- | src/northbridge/intel/i945/gma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index a2e51636db..437b6ce758 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -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; } |