Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb ustir(4): Avoid undefined behaviour if register ...
details: https://anonhg.NetBSD.org/src/rev/b554ef548327
branches: trunk
changeset: 363451:b554ef548327
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Mar 12 21:15:25 2022 +0000
description:
ustir(4): Avoid undefined behaviour if register read fails.
diffstat:
sys/dev/usb/ustir.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 4603cd102e19 -r b554ef548327 sys/dev/usb/ustir.c
--- a/sys/dev/usb/ustir.c Sat Mar 12 20:46:03 2022 +0000
+++ b/sys/dev/usb/ustir.c Sat Mar 12 21:15:25 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ustir.c,v 1.50 2021/09/26 01:16:09 thorpej Exp $ */
+/* $NetBSD: ustir.c,v 1.51 2022/03/12 21:15:25 riastradh Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.50 2021/09/26 01:16:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.51 2022/03/12 21:15:25 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1144,7 +1144,7 @@
int error;
unsigned int regnum;
usbd_status err;
- uint8_t regdata;
+ uint8_t regdata = 0;
if (sc->sc_dying)
return EIO;
Home |
Main Index |
Thread Index |
Old Index