summaryrefslogtreecommitdiffstats
path: root/net/nfc/rawsock.c
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@intel.com>2012-04-10 19:43:10 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:10:37 -0400
commit01ae0eea9bed132a9c4a2c207dbf8e05b0051071 (patch)
tree7de07ede2d172edaa27bfae617b89b2068d36044 /net/nfc/rawsock.c
parentc4fbb6515a4dcec83d340247639b5644c4745528 (diff)
downloadop-kernel-dev-01ae0eea9bed132a9c4a2c207dbf8e05b0051071.zip
op-kernel-dev-01ae0eea9bed132a9c4a2c207dbf8e05b0051071.tar.gz
NFC: Fix next target_idx type and rename for clarity
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/rawsock.c')
-rw-r--r--net/nfc/rawsock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index b2825aa..ec1134c 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;
}
OpenPOWER on IntegriCloud