projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe202fe
)
nfc: netlink: Warning fix
author
Christophe Ricard
<christophe.ricard@gmail.com>
Mon, 17 Aug 2015 06:33:43 +0000
(08:33 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 17 Aug 2015 08:45:19 +0000
(10:45 +0200)
When NFC_ATTR_VENDOR_DATA is not set, data_len is 0 and data is NULL.
Fixes the following warning:
net/nfc/netlink.c:1536:3: warning: 'data' may be used uninitialized
+in this function [-Wmaybe-uninitialized]
return cmd->doit(dev, data, data_len);
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/netlink.c
patch
|
blob
|
history
diff --git
a/net/nfc/netlink.c
b/net/nfc/netlink.c
index 81dfaaacfc4dec6621835614fde07d4f9d6c1d58..73d1ca7c546c63b4cc8db4c7afb9a327fe2436b3 100644
(file)
--- a/
net/nfc/netlink.c
+++ b/
net/nfc/netlink.c
@@
-1524,6
+1524,7
@@
static int nfc_genl_vendor_cmd(struct sk_buff *skb,
if (data_len == 0)
return -EINVAL;
} else {
+ data = NULL;
data_len = 0;
}