diff options
-rw-r--r-- | sys/dev/ata/atapi-cam.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 34811f7..0974087 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -465,9 +465,10 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) { /* ATA always transfers an even number of bytes */ if (!(buf = hcb->dxfer_alloc = malloc(++len, M_ATACAM, - M_NOWAIT | M_ZERO))) + M_NOWAIT | M_ZERO))) { printf("cannot allocate ATAPI/CAM buffer\n"); goto action_oom; + } } request->device = dev; request->driver = hcb; |