summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_xpt.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-10-11 19:57:11 +0000
committermav <mav@FreeBSD.org>2012-10-11 19:57:11 +0000
commitdef5df11b31baaa81e80d27c446435d1aaa654dd (patch)
tree0d139bdadb656dfe9c8aaa91a22b7a526fa73319 /sys/cam/cam_xpt.c
parente4cf877fdd849d05541f682a6ef729b28216135e (diff)
downloadFreeBSD-src-def5df11b31baaa81e80d27c446435d1aaa654dd.zip
FreeBSD-src-def5df11b31baaa81e80d27c446435d1aaa654dd.tar.gz
Don't duplicate path/ccb allocation code, use existing functions.
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r--sys/cam/cam_xpt.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 152782e..bcd0278 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -3857,12 +3857,6 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus)
/* Couldn't satisfy request */
return (CAM_RESRC_UNAVAIL);
}
- path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_NOWAIT);
- if (path == NULL) {
- free(new_bus, M_CAMXPT);
- return (CAM_RESRC_UNAVAIL);
- }
-
if (strcmp(sim->sim_name, "xpt") != 0) {
sim->path_id =
xptpathid(sim->sim_name, sim->unit_number, sim->bus_id);
@@ -3896,7 +3890,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus)
*/
new_bus->xport = &xport_default;
- status = xpt_compile_path(path, /*periph*/NULL, sim->path_id,
+ status = xpt_create_path(&path, /*periph*/NULL, sim->path_id,
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
if (status != CAM_REQ_CMP) {
xpt_release_bus(new_bus);
OpenPOWER on IntegriCloud