Skip to content

Commit

Permalink
IPoIB: Remove unnecessary test for NULL before debugfs_remove()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and Roland Dreier committed Aug 13, 2014
1 parent dd57c93 commit e42fa20
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/infiniband/ulp/ipoib/ipoib_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e42fa20

Please sign in to comment.