Merge "disp: msm: dsi: deny an ESD trigger when not enabled"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
5baf44d58d
@@ -1259,6 +1259,7 @@ static ssize_t debugfs_esd_trigger_check(struct file *file,
|
|||||||
struct dsi_display *display = file->private_data;
|
struct dsi_display *display = file->private_data;
|
||||||
char *buf;
|
char *buf;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
struct drm_panel_esd_config *esd_config = &display->panel->esd_config;
|
||||||
u32 esd_trigger;
|
u32 esd_trigger;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
@@ -1278,6 +1279,11 @@ static ssize_t debugfs_esd_trigger_check(struct file *file,
|
|||||||
atomic_read(&display->panel->esd_recovery_pending))
|
atomic_read(&display->panel->esd_recovery_pending))
|
||||||
return user_len;
|
return user_len;
|
||||||
|
|
||||||
|
if (!esd_config->esd_enabled) {
|
||||||
|
DSI_ERR("ESD feature is not enabled\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
buf = kzalloc(ESD_TRIGGER_STRING_MAX_LEN, GFP_KERNEL);
|
buf = kzalloc(ESD_TRIGGER_STRING_MAX_LEN, GFP_KERNEL);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
Reference in New Issue
Block a user