diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-09 12:09:52 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-09 12:09:52 +0000 |
commit | 26e68c677f6a2c5e8e4e2ab1427d4ffe57f625fc (patch) | |
tree | a8bf7a112e579eda98bbdd0b6eabe1cf4f38867b /sys/dev/usb/uhidev.c | |
parent | e22d22f7262217dbf84ca16d6655b0a89f6638ce (diff) |
Correctly report memory allocation failure in uhidev_set_report_async().
Diffstat (limited to 'sys/dev/usb/uhidev.c')
-rw-r--r-- | sys/dev/usb/uhidev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index 777218c5fd8..46ca3e52b02 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.c,v 1.67 2015/01/09 12:07:50 mpi Exp $ */ +/* $OpenBSD: uhidev.c,v 1.68 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); } |