media: c8sectpfe: 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.

Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20191107085238.GA1285658@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2019-11-07 09:52:38 +01:00
parent 8e12257dea
commit d0dd61a277
1 changed files with 3 additions and 23 deletions

View File

@ -225,36 +225,16 @@ static const struct debugfs_reg32 fei_sys_regs[] = {
void c8sectpfe_debugfs_init(struct c8sectpfei *fei)
{
struct dentry *root;
struct dentry *file;
root = debugfs_create_dir("c8sectpfe", NULL);
if (!root)
goto err;
fei->root = root;
fei->regset = devm_kzalloc(fei->dev, sizeof(*fei->regset), GFP_KERNEL);
if (!fei->regset)
goto err;
return;
fei->regset->regs = fei_sys_regs;
fei->regset->nregs = ARRAY_SIZE(fei_sys_regs);
fei->regset->base = fei->io;
file = debugfs_create_regset32("registers", S_IRUGO, root,
fei->regset);
if (!file) {
dev_err(fei->dev,
"%s not able to create 'registers' debugfs\n"
, __func__);
goto err;
}
return;
err:
debugfs_remove_recursive(root);
fei->root = debugfs_create_dir("c8sectpfe", NULL);
debugfs_create_regset32("registers", S_IRUGO, fei->root, fei->regset);
}
void c8sectpfe_debugfs_exit(struct c8sectpfei *fei)