summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ncr53c9x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/ncr53c9x.c')
-rw-r--r--sys/dev/ic/ncr53c9x.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index 4c8a6413304..8ecb2ed04b9 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.49 2010/09/28 01:50:08 deraadt Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.50 2010/11/11 17:47:00 miod Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -807,12 +807,12 @@ ncr53c9x_scsi_cmd(xs)
li = TINFO_LUN(ti, lun);
if (li == NULL) {
/* Initialize LUN info and add to list. */
- if ((li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT)) == NULL) {
+ if ((li = malloc(sizeof(*li), M_DEVBUF,
+ M_NOWAIT | M_ZERO)) == NULL) {
xs->error = XS_NO_CCB;
scsi_done(xs);
return;
}
- bzero(li, sizeof(*li));
li->last_used = time_second;
li->lun = lun;
s = splbio();
@@ -954,11 +954,11 @@ ncr53c9x_sched(sc)
li = TINFO_LUN(ti, lun);
if (!li) {
/* Initialize LUN info and add to list. */
- if ((li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT)) == NULL) {
+ if ((li = malloc(sizeof(*li), M_DEVBUF,
+ M_NOWAIT | M_ZERO)) == NULL) {
splx(s);
continue;
}
- bzero(li, sizeof(*li));
li->lun = lun;
LIST_INSERT_HEAD(&ti->luns, li, link);