Module Name:    src
Committed By:   maxv
Date:           Sun May 31 08:05:31 UTC 2020

Modified Files:
        src/sys/dev/usb: uhub.c

Log Message:
sc_statuspend is allocated with kmem_zalloc, so no need to memset it.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/dev/usb/uhub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.145 src/sys/dev/usb/uhub.c:1.146
--- src/sys/dev/usb/uhub.c:1.145	Fri May 15 12:34:52 2020
+++ src/sys/dev/usb/uhub.c	Sun May 31 08:05:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.145 2020/05/15 12:34:52 maxv Exp $	*/
+/*	$NetBSD: uhub.c,v 1.146 2020/05/31 08:05:30 maxv Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 /*	$OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
 
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.145 2020/05/15 12:34:52 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.146 2020/05/31 08:05:30 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -365,7 +365,6 @@ uhub_attach(device_t parent, device_t se
 	sc->sc_statuspend = kmem_zalloc(sc->sc_statuslen, KM_SLEEP);
 	sc->sc_status = kmem_alloc(sc->sc_statuslen, KM_SLEEP);
 	mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_SOFTUSB);
-	memset(sc->sc_statuspend, 0, sc->sc_statuslen);
 
 	/* force initial scan */
 	memset(sc->sc_status, 0xff, sc->sc_statuslen);

Reply via email to