Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Handle an error from uhidev_get_report in ucycom...
details: https://anonhg.NetBSD.org/src/rev/86f81657dd4c
branches: trunk
changeset: 790485:86f81657dd4c
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Oct 14 18:15:12 2013 +0000
description:
Handle an error from uhidev_get_report in ucycom_get_cfg
diffstat:
sys/dev/usb/ucycom.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r fff07796dfe9 -r 86f81657dd4c sys/dev/usb/ucycom.c
--- a/sys/dev/usb/ucycom.c Mon Oct 14 18:14:08 2013 +0000
+++ b/sys/dev/usb/ucycom.c Mon Oct 14 18:15:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucycom.c,v 1.36 2013/09/15 15:06:04 martin Exp $ */
+/* $NetBSD: ucycom.c,v 1.37 2013/10/14 18:15:12 skrll Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.36 2013/09/15 15:06:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.37 2013/10/14 18:15:12 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1096,6 +1096,10 @@
err = uhidev_get_report(&sc->sc_hdev, UHID_FEATURE_REPORT,
report, sc->sc_flen);
+ if (err) {
+ DPRINTF(("%s: failed\n", __func__));
+ return;
+ }
cfg = report[4];
baud = (report[3] << 24) + (report[2] << 16) + (report[1] << 8) +
report[0];
Home |
Main Index |
Thread Index |
Old Index