summaryrefslogtreecommitdiffstats
path: root/net/nfc/netlink.c
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-08-17 08:33:43 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2015-08-17 10:45:19 +0200
commitadca3c38d807b341a965d0aba8721d0784d8471b (patch)
treea052a93b94330352f8bd78b52ee6de79e6b8fd58 /net/nfc/netlink.c
parentfe202fe95564023223ce1910c9e352f391abb1d5 (diff)
downloadlinux-stable-adca3c38d807b341a965d0aba8721d0784d8471b.tar.gz
linux-stable-adca3c38d807b341a965d0aba8721d0784d8471b.tar.bz2
linux-stable-adca3c38d807b341a965d0aba8721d0784d8471b.zip
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/netlink.c')
-rw-r--r--net/nfc/netlink.c1
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,
if (data_len == 0)
return -EINVAL;
} else {
+ data = NULL;
data_len = 0;
}