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

Cc: Dmitry Tarnyagin <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: Fabian Frederick <[email protected]>
---
 net/caif/caif_socket.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index e843709..43f750e 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -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;
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to