Don't ask `size < 0' when size is unsigned.
This commit is contained in:
parent
8e1ee72c35
commit
74d7cf9b83
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nouveau_engine_perfmon_base.c,v 1.2 2014/08/23 08:03:34 riastradh Exp $ */
|
||||
/* $NetBSD: nouveau_engine_perfmon_base.c,v 1.3 2016/02/05 23:45:44 riastradh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2013 Red Hat Inc.
|
||||
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_perfmon_base.c,v 1.2 2014/08/23 08:03:34 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_perfmon_base.c,v 1.3 2016/02/05 23:45:44 riastradh Exp $");
|
||||
|
||||
#include <core/option.h>
|
||||
#include <core/class.h>
|
||||
@ -171,8 +171,12 @@ nouveau_perfctr_sample(struct nouveau_object *object, u32 mthd,
|
||||
struct nouveau_perfdom *dom;
|
||||
struct nv_perfctr_sample *args = data;
|
||||
|
||||
#if 1
|
||||
CTASSERT(sizeof(*args) == 0);
|
||||
#else
|
||||
if (size < sizeof(*args))
|
||||
return -EINVAL;
|
||||
#endif
|
||||
ppm->sequence++;
|
||||
|
||||
list_for_each_entry(dom, &ppm->domains, head) {
|
||||
|
Loading…
Reference in New Issue
Block a user