Commit 96c25c81 authored by Vegard Nossum's avatar Vegard Nossum

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: default avatarVegard Nossum <vegard.nossum@gmail.com>
parent 004cdb5a
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/kmemcheck.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/bug.h> #include <asm/bug.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
...@@ -387,6 +388,7 @@ csr1212_new_descriptor_leaf(u8 dtype, u32 specifier_id, ...@@ -387,6 +388,7 @@ csr1212_new_descriptor_leaf(u8 dtype, u32 specifier_id,
if (!kv) if (!kv)
return NULL; return NULL;
kmemcheck_annotate_variable(kv->value.leaf.data[0]);
CSR1212_DESCRIPTOR_LEAF_SET_TYPE(kv, dtype); CSR1212_DESCRIPTOR_LEAF_SET_TYPE(kv, dtype);
CSR1212_DESCRIPTOR_LEAF_SET_SPECIFIER_ID(kv, specifier_id); CSR1212_DESCRIPTOR_LEAF_SET_SPECIFIER_ID(kv, specifier_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment