Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300876
b: refs/heads/master
c: 01ae0ee
h: refs/heads/master
v: v3
  • Loading branch information
Eric Lapuyade authored and John W. Linville committed Apr 12, 2012
1 parent 8d1f91f commit 758b755
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4fbb6515a4dcec83d340247639b5644c4745528
refs/heads/master: 01ae0eea9bed132a9c4a2c207dbf8e05b0051071
2 changes: 1 addition & 1 deletion trunk/include/net/nfc/nfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct nfc_genl_data {

struct nfc_dev {
unsigned idx;
unsigned target_idx;
u32 target_next_idx;
struct nfc_target *targets;
int n_targets;
int targets_generation;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/nfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/nfc/rawsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 758b755

Please sign in to comment.