diff mbox series

platform/firenze: Fix branch-to-null crash

Message ID 20181126020034.9017-1-oohall@gmail.com
State Accepted
Headers show
Series platform/firenze: Fix branch-to-null crash | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master

Commit Message

Oliver O'Halloran Nov. 26, 2018, 2 a.m. UTC
When the bus alloc and free methods were removed we missed a case in the
Firenze platform slot code that relied on the the bus-specific method to
the bus pointer in the request structure. This results in a
branch-to-null during boot and a crash. This patch fixes it by
initialising it manually here.

Fixes: 801462feb7d6 ("core/i2c: Remove bus specific alloc and free callbacks")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 platforms/ibm-fsp/firenze-pci.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stewart Smith Nov. 26, 2018, 7:15 a.m. UTC | #1
"Oliver O'Halloran" <oohall@gmail.com> writes:
> When the bus alloc and free methods were removed we missed a case in the
> Firenze platform slot code that relied on the the bus-specific method to
> the bus pointer in the request structure. This results in a
> branch-to-null during boot and a crash. This patch fixes it by
> initialising it manually here.
>
> Fixes: 801462feb7d6 ("core/i2c: Remove bus specific alloc and free callbacks")
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

Thanks for that - merged to master as of 751cc33a2cfa0008266c38913f0416c1570ce1c0
diff mbox series

Patch

diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
index e075e37f378e..b87c65bfc082 100644
--- a/platforms/ibm-fsp/firenze-pci.c
+++ b/platforms/ibm-fsp/firenze-pci.c
@@ -835,6 +835,7 @@  static void firenze_pci_setup_power_mgt(struct pci_slot *slot,
 	plat_slot->req->rw_len		= 1;
 	plat_slot->req->completion	= firenze_i2c_req_done;
 	plat_slot->req->user_data	= slot;
+	plat_slot->req->bus		= plat_slot->i2c_bus;
 
 	firenze_pci_slot_fixup(slot, info);