Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715067 > unrolled thread

[PATCH 3.16 027/134] IPoIB: Remove unnecessary test for NULL before debugfs_remove()

Started byBen Hutchings <ben@decadent.org.uk>
First post2017-08-18 16:00 +0200
Last post2017-08-18 16:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 027/134] IPoIB: Remove unnecessary test for NULL  before debugfs_remove() Ben Hutchings <ben@decadent.org.uk> - 2017-08-18 16:00 +0200

#1715067 — [PATCH 3.16 027/134] IPoIB: Remove unnecessary test for NULL before debugfs_remove()

FromBen Hutchings <ben@decadent.org.uk>
Date2017-08-18 16:00 +0200
Subject[PATCH 3.16 027/134] IPoIB: Remove unnecessary test for NULL before debugfs_remove()
Message-ID<ufPYB-4vA-9@gated-at.bofh.it>
3.16.47-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Fabian Frederick <fabf@skynet.be>

commit e42fa2092c1049ac9c0e38aaac39ef3c40e91a36 upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/infiniband/ulp/ipoib/ipoib_fs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- 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
 {
 	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)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web