MMCCAM: fix a panic after cam_sim_alloc_dev() removal in sdhci.c

During the removal of cam_sim_alloc_dev() in
aeb04e88f5 for sdhci.c and the
follow-up build-fix in a72af82e31
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:
Bjoern A. Zeeb 2021-07-07 00:37:45 +00:00
parent e834f9a44a
commit da2f833f7a

View File

@ -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) {