Module Name: src
Committed By: jakllsch
Date: Wed May 13 18:44:51 UTC 2020
Modified Files:
src/sys/dev/usb: ohci.c
Log Message:
ohci_alloc_sed() returns a pointer, so use NULL rather than 0 on bail-out
To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/sys/dev/usb/ohci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.301 src/sys/dev/usb/ohci.c:1.302
--- src/sys/dev/usb/ohci.c:1.301 Sun Apr 5 20:59:38 2020
+++ src/sys/dev/usb/ohci.c Wed May 13 18:44:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.301 2020/04/05 20:59:38 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.302 2020/05/13 18:44:51 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.301 2020/04/05 20:59:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.302 2020/05/13 18:44:51 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -411,7 +411,7 @@ ohci_alloc_sed(ohci_softc_t *sc)
err = usb_allocmem(&sc->sc_bus, OHCI_SED_SIZE * OHCI_SED_CHUNK,
OHCI_ED_ALIGN, USBMALLOC_COHERENT, &dma);
if (err)
- return 0;
+ return NULL;
mutex_enter(&sc->sc_lock);
for (i = 0; i < OHCI_SED_CHUNK; i++) {