Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb ohci_alloc_sed() returns a pointer, so use NULL ...



details:   https://anonhg.NetBSD.org/src/rev/5ad28d126cc3
branches:  trunk
changeset: 972028:5ad28d126cc3
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Wed May 13 18:44:51 2020 +0000

description:
ohci_alloc_sed() returns a pointer, so use NULL rather than 0 on bail-out

diffstat:

 sys/dev/usb/ohci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 11c01d38b507 -r 5ad28d126cc3 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Wed May 13 16:17:46 2020 +0000
+++ b/sys/dev/usb/ohci.c        Wed May 13 18:44:51 2020 +0000
@@ -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 @@
                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++) {



Home | Main Index | Thread Index | Old Index