summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2015-08-08 22:02:12 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-08-10 18:09:04 +0200
commit54e227efdf2d03d9d0654296f8ac3a379d5cc851 (patch)
tree4d6ab969af15f44ccdb4d265df6000519c01f135 /src
parent3254ed860782ca30a1244d3a016c3bb97caab177 (diff)
downloadcoreboot-54e227efdf2d03d9d0654296f8ac3a379d5cc851.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/i945/gma.c3
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;
}