From: Christophe Ricard <christophe.ricard@gmail.com>
To: sameo@linux.intel.com
Cc: linux-nfc@lists.01.org, christophe-h.ricard@st.com,
christophe.ricard@gmail.com, stable@vger.kernel.org
Subject: [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function"
Date: Mon, 17 Aug 2015 08:33:43 +0200 [thread overview]
Message-ID: <1439793223-2623-2-git-send-email-christophe-h.ricard@st.com> (raw)
In-Reply-To: <1439793223-2623-1-git-send-email-christophe-h.ricard@st.com>
When NFC_ATTR_VENDOR_DATA is not set, data_len is 0 and data is NULL.
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
---
net/nfc/netlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 81dfaaa..73d1ca7 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;
}
--
2.1.4
next parent reply other threads:[~2015-08-17 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1439793223-2623-1-git-send-email-christophe-h.ricard@st.com>
2015-08-17 6:33 ` Christophe Ricard [this message]
2015-08-17 8:47 ` [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function" Samuel Ortiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439793223-2623-2-git-send-email-christophe-h.ricard@st.com \
--to=christophe.ricard@gmail.com \
--cc=christophe-h.ricard@st.com \
--cc=linux-nfc@lists.01.org \
--cc=sameo@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox