diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2018-03-19 15:54:17 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-03-27 14:51:38 +1100 |
commit | 35f003a01174b253239bfd33fcc12dcf88378ce9 (patch) | |
tree | bd5d4c17d383042956e8c7fdc2cca5b6edd65aa1 /hw | |
parent | 7598ed90a6706158cce34596a33ededbb47af393 (diff) | |
download | skiboot-35f003a01174b253239bfd33fcc12dcf88378ce9.zip skiboot-35f003a01174b253239bfd33fcc12dcf88378ce9.tar.gz skiboot-35f003a01174b253239bfd33fcc12dcf88378ce9.tar.bz2 |
hw/imc: Don't dereference possible NULL
Fixes: CID 263056 and 263052
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/imc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -634,7 +634,6 @@ static int64_t opal_imc_counters_init(uint32_t type, uint64_t addr, uint64_t cpu { struct cpu_thread *c = find_cpu_by_pir(cpu_pir); int port_id, phys_core_id; - struct proc_chip *chip = get_chip(c->chip_id); int ret; uint32_t scoms; @@ -681,6 +680,8 @@ static int64_t opal_imc_counters_init(uint32_t type, uint64_t addr, uint64_t cpu if (has_deep_states) { if ((wakeup_engine_state == WAKEUP_ENGINE_PRESENT)) { + struct proc_chip *chip = get_chip(c->chip_id); + prlog(PR_INFO, "Configuring stopapi for IMC\n"); scoms = XSCOM_ADDR_P9_EP(phys_core_id,pdbar_scom_index[port_id]); ret = p9_stop_save_scom(( void *)chip->homer_base,scoms, |