summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthomas <thomas@FreeBSD.org>2003-08-28 03:56:04 +0000
committerthomas <thomas@FreeBSD.org>2003-08-28 03:56:04 +0000
commit967df3d94789ce6abd73eb6f0a1d80e532cff4ca (patch)
tree0809eb4c9a29a293a02478d2a83b15505a2027e8
parente1f6197ede042d27b08610fbc7992ec62c8572e6 (diff)
downloadFreeBSD-src-967df3d94789ce6abd73eb6f0a1d80e532cff4ca.zip
FreeBSD-src-967df3d94789ce6abd73eb6f0a1d80e532cff4ca.tar.gz
Add missing braces. Fixes boot-time kernel panic with ATAng and ATAPI/CAM.
Reviewed by: roberto
-rw-r--r--sys/dev/ata/atapi-cam.c3
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;
OpenPOWER on IntegriCloud