summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2008-09-11 20:59:03 +0200
committerVegard Nossum <vegard.nossum@gmail.com>2009-06-15 15:49:31 +0200
commit96c25c81ecf452b778e2f432bd17c95de637d129 (patch)
tree813f07c6ae1aa38b9bf41cfc6a19e76a6b561817 /drivers
parent004cdb5a718fa2bb697c541eb1171ee817fc72f1 (diff)
downloadop-kernel-dev-96c25c81ecf452b778e2f432bd17c95de637d129.zip
op-kernel-dev-96c25c81ecf452b778e2f432bd17c95de637d129.tar.gz
ieee1394/csr1212: fix false positive kmemcheck report
kmemcheck reports a use of uninitialized memory here, but it's not a real error. The structure in question has just been allocated, and the whole field is initialized, but it happens in two steps. We fix the false positive by inserting a kmemcheck annotation. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/csr1212.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c
index a6dfeb0..e76cac6 100644
--- a/drivers/ieee1394/csr1212.c
+++ b/drivers/ieee1394/csr1212.c
@@ -35,6 +35,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
+#include <linux/kmemcheck.h>
#include <linux/string.h>
#include <asm/bug.h>
#include <asm/byteorder.h>
@@ -387,6 +388,7 @@ csr1212_new_descriptor_leaf(u8 dtype, u32 specifier_id,
if (!kv)
return NULL;
+ kmemcheck_annotate_variable(kv->value.leaf.data[0]);
CSR1212_DESCRIPTOR_LEAF_SET_TYPE(kv, dtype);
CSR1212_DESCRIPTOR_LEAF_SET_SPECIFIER_ID(kv, specifier_id);
OpenPOWER on IntegriCloud