artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3541a1e
)
Correctly report memory allocation failure in uhidev_set_report_async().
author
mpi
<mpi@openbsd.org>
Fri, 9 Jan 2015 12:09:51 +0000
(12:09 +0000)
committer
mpi
<mpi@openbsd.org>
Fri, 9 Jan 2015 12:09:51 +0000
(12:09 +0000)
sys/dev/usb/uhidev.c
patch
|
blob
|
history
diff --git
a/sys/dev/usb/uhidev.c
b/sys/dev/usb/uhidev.c
index
777218c
..
46ca3e5
100644
(file)
--- a/
sys/dev/usb/uhidev.c
+++ b/
sys/dev/usb/uhidev.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: uhidev.c,v 1.6
7 2015/01/09 12:07:50
mpi Exp $ */
+/* $OpenBSD: uhidev.c,v 1.6
8 2015/01/09 12:09:51
mpi Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@
-680,7
+680,7
@@
uhidev_set_report_async(struct uhidev_softc *sc, int type, int id, void *data,
len++;
buf = malloc(len, M_TEMP, M_NOWAIT);
if (buf == NULL)
- return (
USBD_NOMEM
);
+ return (
-1
);
buf[0] = id;
memcpy(buf + 1, data, len - 1);
}