Skip to content

Commit

Permalink
platform/firenze: Fix branch-to-null crash
Browse files Browse the repository at this point in the history
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: 801462f ("core/i2c: Remove bus specific alloc and free callbacks")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
oohal authored and stewartsmith committed Nov 26, 2018
1 parent e247710 commit 751cc33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions platforms/ibm-fsp/firenze-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 751cc33

Please sign in to comment.