summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-24 21:04:30 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2014-03-14 20:19:08 +0100
commit365a721adbdfe5f6577a66b9b74c12dc98fbb4a3 (patch)
tree8c125f2069d52fdf56bde9f8c27bbf7273ac7fc6 /net/nfc
parent7ebb88e539028f3c144c0c34d3ae187e73238cb6 (diff)
downloadop-kernel-dev-365a721adbdfe5f6577a66b9b74c12dc98fbb4a3.zip
op-kernel-dev-365a721adbdfe5f6577a66b9b74c12dc98fbb4a3.tar.gz
NFC: Remove redundant test for dev->n_targets in nfc_find_target
Without this test, it returns NULL if dev->n_targets is 0 anyway. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index ada9231..be5d50c 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -280,9 +280,6 @@ static struct nfc_target *nfc_find_target(struct nfc_dev *dev, u32 target_idx)
{
int i;
- if (dev->n_targets == 0)
- return NULL;
-
for (i = 0; i < dev->n_targets; i++) {
if (dev->targets[i].idx == target_idx)
return &dev->targets[i];
OpenPOWER on IntegriCloud