From 1553bf11b9d7f3c729d5344bf6770b63a514ca5e Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 24 Nov 2020 14:05:52 +0000 Subject: Remove unneeded locking around xpt_bus_[de]register(). MFC after: 2 weeks --- sys/dev/isp/isp_freebsd.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sys/dev/isp') diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 07b9a2d31298..1fe3fdf94e9f 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -121,17 +121,12 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan) if (sim == NULL) return (ENOMEM); - ISP_LOCK(isp); if (xpt_bus_register(sim, isp->isp_dev, chan) != CAM_SUCCESS) { - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); return (EIO); } - ISP_UNLOCK(isp); if (xpt_create_path(&path, NULL, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(sim)); - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); return (ENXIO); } @@ -168,9 +163,7 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan) if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0, "%s_%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { xpt_free_path(fc->path); - ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(fc->sim)); - ISP_UNLOCK(isp); cam_sim_free(fc->sim, FALSE); return (ENOMEM); } @@ -285,9 +278,7 @@ unwind: ISP_GET_PC(isp, chan, sim, sim); ISP_GET_PC(isp, chan, path, path); xpt_free_path(path); - ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(sim)); - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } cam_simq_free(isp->isp_osinfo.devq); -- cgit v1.3