IPoIB: Remove unnecessary test for NULL before debugfs_remove()
authorFabian Frederick <fabf@skynet.be>
Tue, 12 Aug 2014 23:20:06 +0000 (19:20 -0400)
committerRoland Dreier <roland@purestorage.com>
Wed, 13 Aug 2014 04:59:54 +0000 (21:59 -0700)
Fix checkpatch warning:

    WARNING: debugfs_remove(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/ipoib/ipoib_fs.c

index 50061854616ecb9c5ad409e73bf20889a2eab680..6bd5740e26913df2662bad05a754ad6e88b3bb50 100644 (file)
@@ -281,10 +281,8 @@ void ipoib_delete_debug_files(struct net_device *dev)
 {
        struct ipoib_dev_priv *priv = netdev_priv(dev);
 
-       if (priv->mcg_dentry)
-               debugfs_remove(priv->mcg_dentry);
-       if (priv->path_dentry)
-               debugfs_remove(priv->path_dentry);
+       debugfs_remove(priv->mcg_dentry);
+       debugfs_remove(priv->path_dentry);
 }
 
 int ipoib_register_debugfs(void)