commit | cbcbb6767e24c2568bb6444df8dfafdeec019ef4 | [log] [tgz] |
---|---|---|
author | Angel Pons <th3fanbus@gmail.com> | Fri Oct 23 00:11:26 2020 +0200 |
committer | Angel Pons <th3fanbus@gmail.com> | Sat Oct 24 20:45:49 2020 +0000 |
tree | e84ff19a07dea2fc16c5802c5396427dd8e9031e | |
parent | 84fa224b53b726bec2a75dfdedd234bf60b0246e [diff] [blame] |
sb/intel/lynxpoint: Ensure that `dev->chip_info` is not null Use either a regular null check or `config_of` to avoid bugs. Change-Id: I36a01b898c3e62423f27c2940b5f875b73e36950 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46665 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/southbridge/intel/lynxpoint/serialio.c b/src/southbridge/intel/lynxpoint/serialio.c index 4fb84a5..199cf9f 100644 --- a/src/southbridge/intel/lynxpoint/serialio.c +++ b/src/southbridge/intel/lynxpoint/serialio.c
@@ -131,7 +131,7 @@ static void serialio_init(struct device *dev) { - struct southbridge_intel_lynxpoint_config *config = dev->chip_info; + struct southbridge_intel_lynxpoint_config *config = config_of(dev); struct resource *bar0, *bar1; int sio_index = -1;