From d9c72eee16b9d9066bddacf2c715ad1259f87b40 Mon Sep 17 00:00:00 2001 From: maxv Date: Mon, 15 Aug 2016 09:30:22 +0000 Subject: [PATCH] Use the exact same argument for kmem_alloc and kmem_free; from brainy --- sys/dev/pci/cmpci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index 962c1f94e7df..0c087bacbee4 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmpci.c,v 1.48 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: cmpci.c,v 1.49 2016/08/15 09:30:22 maxv Exp $ */ /* * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.48 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.49 2016/08/15 09:30:22 maxv Exp $"); #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) if (cmpcidebug) printf x @@ -1016,7 +1016,7 @@ cmpci_alloc_dmamem(struct cmpci_softc *sc, size_t size, void **r_addr) struct cmpci_dmanode *n; error = 0; - n = kmem_alloc(sizeof(struct cmpci_dmanode), KM_SLEEP); + n = kmem_alloc(sizeof(*n), KM_SLEEP); if (n == NULL) { error = ENOMEM; goto quit;