Skip to content

Commit

Permalink
net/caif/caif_socket.c: remove unnecessary null test before debugfs_r…
Browse files Browse the repository at this point in the history
…emove_recursive

based on checkpatch:
"debugfs_remove_recursive(NULL) is safe this check is probably not required"

Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Jul 3, 2014
1 parent 9f16dc2 commit fb0d164
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,7 @@ static int caif_release(struct socket *sock)
sock->sk = NULL;

WARN_ON(IS_ERR(cf_sk->debugfs_socket_dir));
if (cf_sk->debugfs_socket_dir != NULL)
debugfs_remove_recursive(cf_sk->debugfs_socket_dir);
debugfs_remove_recursive(cf_sk->debugfs_socket_dir);

lock_sock(&(cf_sk->sk));
sk->sk_state = CAIF_DISCONNECTED;
Expand Down

0 comments on commit fb0d164

Please sign in to comment.