Use NULL instead of 0 when returning a NULL pointer.
Also, remedy minor whitespace issue.
This commit is contained in:
parent
36854f2e86
commit
99fefbecd1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.c,v 1.152 2013/04/04 13:27:56 skrll Exp $ */
|
||||
/* $NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.152 2013/04/04 13:27:56 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -393,7 +393,7 @@ void *
|
||||
usbd_get_buffer(usbd_xfer_handle xfer)
|
||||
{
|
||||
if (!(xfer->rqflags & URQ_DEV_DMABUF))
|
||||
return (0);
|
||||
return (NULL);
|
||||
return (KERNADDR(&xfer->dmabuf, 0));
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ usb_endpoint_descriptor_t *
|
||||
usbd_interface2endpoint_descriptor(usbd_interface_handle iface, u_int8_t index)
|
||||
{
|
||||
if (index >= iface->idesc->bNumEndpoints)
|
||||
return (0);
|
||||
return (NULL);
|
||||
return (iface->endpoints[index].edesc);
|
||||
}
|
||||
|
||||
@ -840,7 +840,7 @@ usb_transfer_complete(usbd_xfer_handle xfer)
|
||||
|
||||
if (!repeat) {
|
||||
/* Remove request from queue. */
|
||||
|
||||
|
||||
KASSERTMSG(!SIMPLEQ_EMPTY(&pipe->queue),
|
||||
"pipe %p is empty, but xfer %p wants to complete", pipe,
|
||||
xfer);
|
||||
@ -1180,7 +1180,7 @@ usbd_get_endpoint_descriptor(usbd_interface_handle iface, u_int8_t address)
|
||||
if (ep->edesc->bEndpointAddress == address)
|
||||
return (iface->endpoints[i].edesc);
|
||||
}
|
||||
return (0);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user