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.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
vpu->debugfs,
inst,
&vpu_dbg_inst_fops);
- if (!inst->debugfs) {
- dev_err(inst->dev, "vpu create debugfs %s fail\n", name);
- return -EINVAL;
- }
return 0;
}
vpu->debugfs,
core,
&vpu_dbg_core_fops);
- if (!core->debugfs) {
- dev_err(core->dev, "vpu create debugfs %s fail\n", name);
- return -EINVAL;
- }
}
if (!core->debugfs_fwlog) {
scnprintf(name, sizeof(name), "fwlog.%d", core->id);
vpu->debugfs,
core,
&vpu_dbg_fwlog_fops);
- if (!core->debugfs_fwlog) {
- dev_err(core->dev, "vpu create debugfs %s fail\n", name);
- return -EINVAL;
- }
}
return 0;