Merge "disp: msm: dsi: check for null pointer during debugfs deinit"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
1961183b41
@@ -333,6 +333,8 @@ static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
|
|||||||
|
|
||||||
dsi_ctrl->debugfs_root = dir;
|
dsi_ctrl->debugfs_root = dir;
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
|
||||||
error_remove_dir:
|
error_remove_dir:
|
||||||
debugfs_remove(dir);
|
debugfs_remove(dir);
|
||||||
error:
|
error:
|
||||||
@@ -341,7 +343,10 @@ error:
|
|||||||
|
|
||||||
static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
|
static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
|
||||||
{
|
{
|
||||||
|
if (dsi_ctrl->debugfs_root) {
|
||||||
debugfs_remove(dsi_ctrl->debugfs_root);
|
debugfs_remove(dsi_ctrl->debugfs_root);
|
||||||
|
dsi_ctrl->debugfs_root = NULL;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -2097,7 +2097,10 @@ error:
|
|||||||
|
|
||||||
static int dsi_display_debugfs_deinit(struct dsi_display *display)
|
static int dsi_display_debugfs_deinit(struct dsi_display *display)
|
||||||
{
|
{
|
||||||
|
if (display->root) {
|
||||||
debugfs_remove_recursive(display->root);
|
debugfs_remove_recursive(display->root);
|
||||||
|
display->root = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user