summaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 13:18:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 13:18:06 -0700
commit22b5371412f91ea0e1bf5e1c1dd527eb3eed6dc2 (patch)
tree33db9436f1bf27b8daaf2ad46f85ce7fdb508c7f /drivers/staging/tidspbridge
parentb30f0d0caa1ffc1051c82cfb42014e084b6ac4c3 (diff)
Revert "staging: tidspbridge: use safer test on the result of find_first_zero_bit"
This reverts commit cc0be81f00472d782804293766ddd9d1c2b4ebd1, it was incorrect. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r--drivers/staging/tidspbridge/rmgr/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 305f3a60db7..9d3044a384e 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -935,7 +935,7 @@ int node_connect(struct node_object *node1, u32 stream1,
node2_type == NODE_DAISSOCKET)) {
/* Find available pipe */
pipe_id = find_first_zero_bit(hnode_mgr->pipe_map, MAXPIPES);
- if (pipe_id >= MAXPIPES) {
+ if (pipe_id == MAXPIPES) {
status = -ECONNREFUSED;
goto out_unlock;
}
@@ -1008,7 +1008,7 @@ int node_connect(struct node_object *node1, u32 stream1,
status = -EINVAL;
goto out_unlock;
}
- if (chnl_id >= CHNL_MAXCHANNELS) {
+ if (chnl_id == CHNL_MAXCHANNELS) {
status = -ECONNREFUSED;
goto out_unlock;
}