projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ebb88e
)
NFC: Remove redundant test for dev->n_targets in nfc_find_target
author
Axel Lin
<axel.lin@ingics.com>
Mon, 24 Feb 2014 13:04:30 +0000
(21:04 +0800)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 14 Mar 2014 19:19:08 +0000
(20:19 +0100)
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>
net/nfc/core.c
patch
|
blob
|
history
diff --git
a/net/nfc/core.c
b/net/nfc/core.c
index ada92316f723f882c44b5529d651dda08e9fab48..be5d50c6d81dcb6a17c433049e23d1977417ab5e 100644
(file)
--- 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];