Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb usb(4): Fix uninitialized variable for error bra...



details:   https://anonhg.NetBSD.org/src/rev/fa8cd4d79b94
branches:  trunk
changeset: 983986:fa8cd4d79b94
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jun 16 13:20:49 2021 +0000

description:
usb(4): Fix uninitialized variable for error branch.

diffstat:

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

diffs (27 lines):

diff -r ee7433b1d251 -r fa8cd4d79b94 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Wed Jun 16 11:55:10 2021 +0000
+++ b/sys/dev/usb/usbdi.c       Wed Jun 16 13:20:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.217 2021/06/14 15:35:34 mlelstv Exp $      */
+/*     $NetBSD: usbdi.c,v 1.218 2021/06/16 13:20:49 riastradh Exp $    */
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.217 2021/06/14 15:35:34 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.218 2021/06/16 13:20:49 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -223,7 +223,7 @@
 usbd_open_pipe_ival(struct usbd_interface *iface, uint8_t address,
                    uint8_t flags, struct usbd_pipe **pipe, int ival)
 {
-       struct usbd_pipe *p;
+       struct usbd_pipe *p = NULL;
        struct usbd_endpoint *ep = NULL /* XXXGCC */;
        bool piperef = false;
        usbd_status err;



Home | Main Index | Thread Index | Old Index