The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d6e7349254e3d26bbecf105be28686a5eb976537

commit d6e7349254e3d26bbecf105be28686a5eb976537
Author:     Warner Losh <[email protected]>
AuthorDate: 2021-06-28 21:59:04 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2021-06-28 21:59:04 +0000

    cam mmc: Assert that the xpt_bus_register registered a device_t
    
    Reviewed by:            scottl@
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D30854
---
 sys/cam/mmc/mmc_xpt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
index 6b2fecdab0fb..c94e74876ed7 100644
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -406,8 +406,6 @@ mmccam_start_discovery(struct cam_sim *sim)
        union ccb *ccb;
        uint32_t pathid;
 
-       KASSERT(sim->sim_dev != NULL, ("mmccam_start_discovery(%s): sim_dev is 
not initialized,"
-           " has cam_sim_alloc_dev() been used?", cam_sim_name(sim)));
        pathid = cam_sim_path(sim);
        ccb = xpt_alloc_ccb();
 
@@ -420,6 +418,10 @@ mmccam_start_discovery(struct cam_sim *sim)
                xpt_free_ccb(ccb);
                return;
        }
+
+       KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL,
+           ("%s(%s): device is not initialized on sim's path",
+           __func__, cam_sim_name(sim)));
        xpt_rescan(ccb);
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to