mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
7ebb88e539
commit
365a721adb
1 changed files with 0 additions and 3 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue