mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
msm: cvp: Fix NULL pointer error when DEBUG_FS is disabled
Add extra check to avoid NULL pointer derefernce when DEBUG_FS is disabled. Change-Id: I84f4385b91250ea6a200ff36c679f448229da6c6 Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
This commit is contained in:
parent
cba97f251a
commit
ac60116210
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue