diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-14 12:47:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-14 18:37:48 +0300 |
commit | 227ab8baa15bdd7a48acfb7b61c52a7a5eb87e72 (patch) | |
tree | c6667b129db854240efbe1f2872e4325441273ff /sound/soc/fsl/fsl_ssi_dbg.c | |
parent | 7f807f280964e31fb32fe6aaa263cfa2488236d8 (diff) | |
download | linux-227ab8baa15bdd7a48acfb7b61c52a7a5eb87e72.tar.xz |
ASoC: fsl: 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.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi_dbg.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi_dbg.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/soc/fsl/fsl_ssi_dbg.c b/sound/soc/fsl/fsl_ssi_dbg.c index 6f6294149476..2a20ee23dc52 100644 --- a/sound/soc/fsl/fsl_ssi_dbg.c +++ b/sound/soc/fsl/fsl_ssi_dbg.c @@ -126,25 +126,15 @@ static int fsl_ssi_stats_show(struct seq_file *s, void *unused) DEFINE_SHOW_ATTRIBUTE(fsl_ssi_stats); -int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev) +void fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev) { ssi_dbg->dbg_dir = debugfs_create_dir(dev_name(dev), NULL); - if (!ssi_dbg->dbg_dir) - return -ENOMEM; - ssi_dbg->dbg_stats = debugfs_create_file("stats", 0444, - ssi_dbg->dbg_dir, ssi_dbg, - &fsl_ssi_stats_fops); - if (!ssi_dbg->dbg_stats) { - debugfs_remove(ssi_dbg->dbg_dir); - return -ENOMEM; - } - - return 0; + debugfs_create_file("stats", 0444, ssi_dbg->dbg_dir, ssi_dbg, + &fsl_ssi_stats_fops); } void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg) { - debugfs_remove(ssi_dbg->dbg_stats); - debugfs_remove(ssi_dbg->dbg_dir); + debugfs_remove_recursive(ssi_dbg->dbg_dir); } |