From: Fabian Frederick Date: Tue, 12 Aug 2014 23:20:06 +0000 (-0400) Subject: IPoIB: Remove unnecessary test for NULL before debugfs_remove() X-Git-Tag: firefly_0821_release~176^2~3387^2^3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e42fa2092c1049ac9c0e38aaac39ef3c40e91a36;p=firefly-linux-kernel-4.4.55.git IPoIB: Remove unnecessary test for NULL before debugfs_remove() Fix checkpatch warning: WARNING: debugfs_remove(NULL) is safe this check is probably not required Signed-off-by: Fabian Frederick Signed-off-by: Doug Ledford Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c index 50061854616e..6bd5740e2691 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c @@ -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)