]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/caif/caif_socket.c: remove unnecessary null test before debugfs_remove_recursive
authorFabian Frederick <fabf@skynet.be>
Fri, 27 Jun 2014 21:07:43 +0000 (23:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jul 2014 00:05:29 +0000 (17:05 -0700)
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>
net/caif/caif_socket.c

index e8437094d15fc8a7aa342969f9c6ebd7afeb740a..43f750e88e199e451d7de049255257b46cd947ab 100644 (file)
@@ -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;