dlkm: goodix_fod_mmi: fix KE issue

When there is not panel connect to board , the active_panel is NULL
we need to protect it to avoid KE.

Change-Id: Idbb91740f5c5c043d80cf527113abf1e6f0337e3
Signed-off-by: wuwl10 <wuwl10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2926504
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
wuwl10 2024-04-03 17:45:36 +08:00 • committed by Marcelo Bissaro
commit a7b7482893

View file

@ -879,9 +879,13 @@ static int gf_probe(struct platform_device *pdev)
gf_dev->notifier = goodix_noti_block;
#if defined(CONFIG_GOODIX_DRM_PANEL_NOTIFICATIONS)
gf_dev->active_panel = NULL;
drm_check_dt(gf_dev);
status = drm_panel_notifier_register(gf_dev->active_panel, &gf_dev->notifier);
pr_info("gf_probe drm_panel_notifier_register: status = %d\n", status);
status = drm_check_dt(gf_dev);
if (status >= 0) {
status = drm_panel_notifier_register(gf_dev->active_panel, &gf_dev->notifier);
pr_info("gf_probe drm_panel_notifier_register: status = %d\n", status);
} else {
pr_info("gf_probe drm_panel is NULL: = %d\n", status);
}
#else
fb_register_client(&gf_dev->notifier);
#endif