diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-11-23 12:57:24 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-11-23 12:57:24 +0000 |
| commit | 2ef735f477367c1e47801c6e091a2b08e66813c9 (patch) | |
| tree | ee7cac6c68f80f01b7e7a4600dcd86c04eafd54a /sys/dev/hptmv | |
| parent | 3df3c40de4704cc3fc23e7154bab923f6e5cfb21 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hptmv')
| -rw-r--r-- | sys/dev/hptmv/entry.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index dc82f8acf2c6..873d29d7c8d6 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -2008,9 +2008,8 @@ hpt_attach(device_t dev) } - if((ccb = (union ccb *)malloc(sizeof(*ccb), M_DEVBUF, M_WAITOK)) != (union ccb*)NULL) + if ((ccb = xpt_alloc_ccb()) != NULL) { - bzero(ccb, sizeof(*ccb)); ccb->ccb_h.pinfo.priority = 1; ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; } @@ -2065,7 +2064,7 @@ hpt_attach(device_t dev) ccb->csa.callback = hpt_async; ccb->csa.callback_arg = hpt_vsim; xpt_action((union ccb *)ccb); - free(ccb, M_DEVBUF); + xpt_free_ccb(ccb); if (device_get_unit(dev) == 0) { /* Start the work thread. XXX */ |
