Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb ugen(4): Make sure opened is initialized in ugen...



details:   https://anonhg.NetBSD.org/src/rev/65016e160c76
branches:  trunk
changeset: 371980:65016e160c76
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Oct 23 11:06:37 2022 +0000

description:
ugen(4): Make sure opened is initialized in ugenopen.

Otherwise the error branch is based on garbage.

diffstat:

 sys/dev/usb/ugen.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 7cacbe52652a -r 65016e160c76 sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c        Sun Oct 23 08:38:21 2022 +0000
+++ b/sys/dev/usb/ugen.c        Sun Oct 23 11:06:37 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ugen.c,v 1.170 2022/10/23 06:27:26 skrll Exp $ */
+/*     $NetBSD: ugen.c,v 1.171 2022/10/23 11:06:37 riastradh Exp $     */
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.170 2022/10/23 06:27:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.171 2022/10/23 11:06:37 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -562,7 +562,7 @@
        struct usbd_xfer *xfer;
        int i, j;
        int error;
-       int opened;
+       int opened = 0;
 
        UGENHIST_FUNC(); UGENHIST_CALLED();
 



Home | Main Index | Thread Index | Old Index