diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-09-08 14:06:10 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-09-08 14:08:11 +1000 |
commit | 67301baebfce31641d117eacf920e87f75c64d4f (patch) | |
tree | 2252c8e95efd3bd79782e90c1541b31a2b6259f6 /hw/fsp | |
parent | 8abbe1d3978493a90be83f3c16df29c9263f6e11 (diff) | |
download | blackbird-skiboot-67301baebfce31641d117eacf920e87f75c64d4f.tar.gz blackbird-skiboot-67301baebfce31641d117eacf920e87f75c64d4f.zip |
Fix index of -1 into array
In the event that we had no IO paths up, we could index -1 into the
array of iopaths, no doubt causing casual amounts of fun.
Although, since this is in early boot code only, the possibility of
this being a problem is quite slim.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index c80fff72..14b44fa0 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -1914,7 +1914,9 @@ static void fsp_create_fsp(struct dt_node *fsp_node) fsp_init_links(fsp_node); fsp_update_links_states(fsp); - psi_enable_fsp_interrupt(fsp->iopath[fsp->active_iopath].psi); + + if (fsp->active_iopath >= 0) + psi_enable_fsp_interrupt(fsp->iopath[fsp->active_iopath].psi); } static void fsp_opal_poll(void *data __unused) |