Commit 635d7302 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Vinod Koul

dmaengine: bcm-sba-raid: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Also, because there is no need to save the file dentry, remove the
variable that was saving it as it was never even being used once set.

Cc: Vinod Koul <vkoul@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 718745f8
...@@ -164,7 +164,6 @@ struct sba_device { ...@@ -164,7 +164,6 @@ struct sba_device {
struct list_head reqs_free_list; struct list_head reqs_free_list;
/* DebugFS directory entries */ /* DebugFS directory entries */
struct dentry *root; struct dentry *root;
struct dentry *stats;
}; };
/* ====== Command helper routines ===== */ /* ====== Command helper routines ===== */
...@@ -1716,17 +1715,11 @@ static int sba_probe(struct platform_device *pdev) ...@@ -1716,17 +1715,11 @@ static int sba_probe(struct platform_device *pdev)
/* Create debugfs root entry */ /* Create debugfs root entry */
sba->root = debugfs_create_dir(dev_name(sba->dev), NULL); sba->root = debugfs_create_dir(dev_name(sba->dev), NULL);
if (IS_ERR_OR_NULL(sba->root)) {
dev_err(sba->dev, "failed to create debugfs root entry\n");
sba->root = NULL;
goto skip_debugfs;
}
/* Create debugfs stats entry */ /* Create debugfs stats entry */
sba->stats = debugfs_create_devm_seqfile(sba->dev, "stats", sba->root, debugfs_create_devm_seqfile(sba->dev, "stats", sba->root,
sba_debugfs_stats_show); sba_debugfs_stats_show);
if (IS_ERR_OR_NULL(sba->stats))
dev_err(sba->dev, "failed to create debugfs stats file\n");
skip_debugfs: skip_debugfs:
/* Register DMA device with Linux async framework */ /* Register DMA device with Linux async framework */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment