From: Fabian Frederick Date: Fri, 27 Jun 2014 21:07:43 +0000 (+0200) Subject: net/caif/caif_socket.c: remove unnecessary null test before debugfs_remove_recursive X-Git-Tag: v4.14-rc1~7092^2~238 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb0d164cc1e46ddb22e8fac9f9cb94fdaeddd70f;p=platform%2Fkernel%2Flinux-rpi.git net/caif/caif_socket.c: remove unnecessary null test before debugfs_remove_recursive based on checkpatch: "debugfs_remove_recursive(NULL) is safe this check is probably not required" Cc: Dmitry Tarnyagin Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller --- 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;