diff options
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/core.c | 2 | ||||
-rw-r--r-- | net/nfc/rawsock.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c index d92400087b61..db88429cfc1a 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c @@ -435,7 +435,7 @@ int nfc_targets_found(struct nfc_dev *dev, dev->polling = false; for (i = 0; i < n_targets; i++) - targets[i].idx = dev->target_idx++; + targets[i].idx = dev->target_next_idx++; spin_lock_bh(&dev->targets_lock); diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index b2825aa85f64..ec1134c9e07f 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c @@ -92,8 +92,8 @@ static int rawsock_connect(struct socket *sock, struct sockaddr *_addr, goto error; } - if (addr->target_idx > dev->target_idx - 1 || - addr->target_idx < dev->target_idx - dev->n_targets) { + if (addr->target_idx > dev->target_next_idx - 1 || + addr->target_idx < dev->target_next_idx - dev->n_targets) { rc = -EINVAL; goto error; } |