Skip to content

Commit

Permalink
NFC: Remove repeated code for NULL check
Browse files Browse the repository at this point in the history
This patch remove the repeated code for checking llcp_sock &
llcp_sock->dev against NULL.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Syam Sidhardhan authored and Samuel Ortiz committed Sep 24, 2012
1 parent 058576d commit 5db327f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/nfc/llcp/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,
pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx,
llcp_sock->dsap, llcp_sock->ssap);

if (llcp_sock == NULL || llcp_sock->dev == NULL)
return -EBADFD;

uaddr->sa_family = AF_NFC;

*len = sizeof(struct sockaddr_nfc_llcp);
Expand Down

0 comments on commit 5db327f

Please sign in to comment.