From adca3c38d807b341a965d0aba8721d0784d8471b Mon Sep 17 00:00:00 2001 From: Christophe Ricard Date: Mon, 17 Aug 2015 08:33:43 +0200 Subject: 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 Signed-off-by: Samuel Ortiz --- net/nfc/netlink.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/nfc/netlink.c') 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; } -- cgit v1.2.3