From 48f23876644a7029bba25862b877ff2f65deab8d Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Sat, 18 Sep 2021 02:57:58 +0000 Subject: [PATCH] solve the codex warning Signed-off-by: YOUR_NAME --- model/display/driver/hdf_disp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/model/display/driver/hdf_disp.c b/model/display/driver/hdf_disp.c index f5cf03ebb..83ca9f1d2 100644 --- a/model/display/driver/hdf_disp.c +++ b/model/display/driver/hdf_disp.c @@ -425,14 +425,17 @@ static void EsdWorkHandler(void *arg) struct DispManager *disp = NULL; disp = GetDispManager(); - if ((disp == NULL) || (disp->dispCtrl == NULL) || (devId >= disp->panelManager->panelNum)) { - HDF_LOGE("%s: dispCtrl is null or panel is null", __func__); + if ((disp == NULL) || (disp->dispCtrl == NULL) || (disp->panelManager == NULL) || + (devId >= disp->panelManager->panelNum)) { + HDF_LOGE("%s: disp or dispCtrl or panelManager is null", __func__); return; } panel = disp->panelManager->panel[devId]; - if ((panel->esd != NULL) && (panel->esd->checkFunc != NULL)) { - ret = panel->esd->checkFunc(panel); + if ((panel == NULL) || (panel->esd == NULL) || (panel->esd->checkFunc == NULL)) { + HDF_LOGE("%s: panel or esd or checkFunc is null", __func__); + return; } + ret = panel->esd->checkFunc(panel); if (ret != HDF_SUCCESS) { OsalMutexLock(&disp->dispMutex); if (panel->esd->state == ESD_RUNNING) { -- Gitee