diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2015-08-17 02:33:43 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-08-17 04:45:19 -0400 |
commit | adca3c38d807b341a965d0aba8721d0784d8471b (patch) | |
tree | a052a93b94330352f8bd78b52ee6de79e6b8fd58 /net/nfc | |
parent | fe202fe95564023223ce1910c9e352f391abb1d5 (diff) |
nfc: netlink: Warning fix
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>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/netlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 81dfaaacfc4d..73d1ca7c546c 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c | |||
@@ -1524,6 +1524,7 @@ static int nfc_genl_vendor_cmd(struct sk_buff *skb, | |||
1524 | if (data_len == 0) | 1524 | if (data_len == 0) |
1525 | return -EINVAL; | 1525 | return -EINVAL; |
1526 | } else { | 1526 | } else { |
1527 | data = NULL; | ||
1527 | data_len = 0; | 1528 | data_len = 0; |
1528 | } | 1529 | } |
1529 | 1530 | ||