diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-02-06 14:28:31 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-02-23 17:14:45 -0500 |
commit | 44a589ca2de4d7980f8b335481a09bf818065dbe (patch) | |
tree | fb077d602164143d84650b5f72e2b83b181b2baf /net/nfc | |
parent | b3050248c167871ca52cfdb2ce78aa2460249346 (diff) |
NFC: NCI: Fix NULL pointer dereference
The check should be for setup function pointer.
This patch fixes NULL pointer dereference issue for NCI
based NFC driver which doesn't define setup handler.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/nci/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 46bda010bf11..56db888b1cd5 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -301,7 +301,7 @@ static int nci_open_device(struct nci_dev *ndev) | |||
301 | rc = __nci_request(ndev, nci_reset_req, 0, | 301 | rc = __nci_request(ndev, nci_reset_req, 0, |
302 | msecs_to_jiffies(NCI_RESET_TIMEOUT)); | 302 | msecs_to_jiffies(NCI_RESET_TIMEOUT)); |
303 | 303 | ||
304 | if (ndev->ops->setup(ndev)) | 304 | if (ndev->ops->setup) |
305 | ndev->ops->setup(ndev); | 305 | ndev->ops->setup(ndev); |
306 | 306 | ||
307 | if (!rc) { | 307 | if (!rc) { |