Merge "msm: cvp: Fix NULL pointer error when DEBUG_FS is disabled"

This commit is contained in:
qctecmdr 2020-04-16 11:22:40 -07:00 • committed by Gerrit - the friendly Code Review server
commit 8c3d768ae8

View file

@ -349,7 +349,8 @@ struct dentry *msm_cvp_debugfs_init_core(struct msm_cvp_core *core,
snprintf(debugfs_name, MAX_DEBUGFS_NAME, "core%d", core->id);
dir = debugfs_create_dir(debugfs_name, parent);
if (!dir) {
if (IS_ERR_OR_NULL(dir)) {
dir = NULL;
dprintk(CVP_ERR, "Failed to create debugfs for msm_cvp\n");
goto failed_create_dir;
}
@ -495,7 +496,8 @@ struct dentry *msm_cvp_debugfs_init_inst(struct msm_cvp_inst *inst,
idata->inst = inst;
dir = debugfs_create_dir(debugfs_name, parent);
if (!dir) {
if (IS_ERR_OR_NULL(dir)) {
dir = NULL;
dprintk(CVP_ERR, "Failed to create debugfs for msm_cvp\n");
goto failed_create_dir;
}