Skip to content

Commit

Permalink
NFC: double unlock in nfc_llcp_recv_connect()
Browse files Browse the repository at this point in the history
We unlock inside the if block on the other side of this if else
statement.  It could result in calling mutex_unlock() twice.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Dec 19, 2011
1 parent bad6919 commit 341ee43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,9 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
goto enqueue;
}
}

mutex_unlock(&local->socket_lock);
}

mutex_unlock(&local->socket_lock);

reason = LLCP_DM_NOBOUND;
goto fail;

Expand Down

0 comments on commit 341ee43

Please sign in to comment.