Skip to contentSkip to conversation

infiniband: remove redundant condition check before debugfs_remove

PATCH Applied zhong jiang 2 participants 2 messages Sep 8, 2018 – Sep 11, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 infiniband: remove redundant condition check before debugfs_remove

debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition.

---
 drivers/infiniband/hw/usnic/usnic_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/usnic/usnic_debugfs.c +1 -2
index 92dc66c..a311570 100644
@@ -165,6 +165,5 @@ void usnic_debugfs_flow_add(struct usnic_ib_qp_grp_flow *qp_flow)
 
 void usnic_debugfs_flow_remove(struct usnic_ib_qp_grp_flow *qp_flow)
 {
-	if (!IS_ERR_OR_NULL(qp_flow->dbgfs_dentry))
-		debugfs_remove(qp_flow->dbgfs_dentry);
+	debugfs_remove(qp_flow->dbgfs_dentry);
 }
Signature · 1 line
1.7.12.4
#1 lore raw
Quoted 7 lines · zhong jiang

debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition.

---
 drivers/infiniband/hw/usnic/usnic_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason