Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb we want to check that the allocation is going to...
details: https://anonhg.NetBSD.org/src/rev/3879a6c13d48
branches: trunk
changeset: 845909:3879a6c13d48
user: maya <maya%NetBSD.org@localhost>
date: Wed Oct 23 01:30:54 2019 +0000
description:
we want to check that the allocation is going to be zero, not whether
some pointer is NULL (oops).
Should be the right version this time!
diffstat:
sys/dev/usb/uvideo.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b4305bd382c8 -r 3879a6c13d48 sys/dev/usb/uvideo.c
--- a/sys/dev/usb/uvideo.c Wed Oct 23 01:03:36 2019 +0000
+++ b/sys/dev/usb/uvideo.c Wed Oct 23 01:30:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvideo.c,v 1.51 2019/10/23 01:03:36 maya Exp $ */
+/* $NetBSD: uvideo.c,v 1.52 2019/10/23 01:30:54 maya Exp $ */
/*
* Copyright (c) 2008 Patrick Mahoney
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.51 2019/10/23 01:03:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.52 2019/10/23 01:30:54 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -999,7 +999,7 @@
uvideo_unit_alloc_controls(struct uvideo_unit *vu, uint8_t size,
const uint8_t *controls)
{
- if ((vu->vu_controls == 0) || (size == 0))
+ if (size == 0)
return USBD_INVAL;
vu->vu_controls = kmem_alloc(sizeof(*vu->vu_controls) * size, KM_SLEEP);
Home |
Main Index |
Thread Index |
Old Index