MMCCAM: fix a panic after cam_sim_alloc_dev() removal in sdhci.c
During the removal of cam_sim_alloc_dev() in aeb04e88f51a706ef4b6a380bf5e82d15203fb6a for sdhci.c and the follow-up build-fix in a72af82e3169fcacfedf9047120679300a4296f8 slot->dev and slot->bus got mixed up for MMCCAM; slot->dev is only used in the !MMCCAM case so is uninitialised here leading to a panic; switch back to slot->bus to return to the status quo. Reviewed by: imp (ack on arm@) X-Differential Revision: https://reviews.freebsd.org/D30857
This commit is contained in:
parent
e834f9a44a
commit
da2f833f7a
@ -2484,7 +2484,7 @@ sdhci_start_slot(struct sdhci_slot *slot)
|
||||
|
||||
mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF);
|
||||
slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll,
|
||||
"sdhci_slot", slot, device_get_unit(slot->dev),
|
||||
"sdhci_slot", slot, device_get_unit(slot->bus),
|
||||
&slot->sim_mtx, 1, 1, slot->devq);
|
||||
|
||||
if (slot->sim == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user