diff --git a/model/display/driver/backlight/hdf_bl.c b/model/display/driver/backlight/hdf_bl.c index 0a6ed3a1..92f8ccde 100644 --- a/model/display/driver/backlight/hdf_bl.c +++ b/model/display/driver/backlight/hdf_bl.c @@ -242,7 +242,7 @@ int32_t GetCurrBrightness(struct BacklightDev *blDev, uint32_t *brightness) return HDF_FAILURE; } *brightness = GetBlDevBrightness(blDev, CURRENT_BRIGHTNESS); - return HDF_SUCCESS; + return HDF_SUCCESS; } int32_t GetDefBrightness(struct BacklightDev *blDev, uint32_t *brightness) diff --git a/model/display/driver/backlight/pwm_bl.c b/model/display/driver/backlight/pwm_bl.c index f2dc3ac7..ba4a49f8 100644 --- a/model/display/driver/backlight/pwm_bl.c +++ b/model/display/driver/backlight/pwm_bl.c @@ -174,7 +174,7 @@ FAIL: OsalMemFree(blPwmDev); return HDF_FAILURE; } - + struct HdfDriverEntry g_pwmBlDevEntry = { .moduleVersion = 1, .moduleName = "PWM_BL", diff --git a/model/display/driver/hdf_disp.c b/model/display/driver/hdf_disp.c index e86f6884..deafdde8 100644 --- a/model/display/driver/hdf_disp.c +++ b/model/display/driver/hdf_disp.c @@ -626,6 +626,7 @@ static int32_t EsdCheckInit(struct DispManager *disp) ret = EsdResInit(esd, panel); if (ret != HDF_SUCCESS) { HDF_LOGE("%s EsdResInit fail", __func__); + esd = NULL; return HDF_FAILURE; } disp->esd = esd; diff --git a/model/display/driver/hdf_drm_panel.c b/model/display/driver/hdf_drm_panel.c index acf0e564..2ec39f13 100644 --- a/model/display/driver/hdf_drm_panel.c +++ b/model/display/driver/hdf_drm_panel.c @@ -29,12 +29,12 @@ static int HdfDrmPanelUnprepare(struct drm_panel *panel) { return 0; } - + static int HdfDrmPanelPrepare(struct drm_panel *panel) { return 0; } - + static int HdfDrmPanelDisable(struct drm_panel *panel) { struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); @@ -47,7 +47,7 @@ static int HdfDrmPanelDisable(struct drm_panel *panel) OsalMutexUnlock(&hdfDrmPanel->manager->dispMutex); return HDF_SUCCESS; } - + static int HdfDrmPanelEnable(struct drm_panel *panel) { struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); @@ -84,7 +84,7 @@ static int HdfDrmPanelGetModes(struct drm_panel *panel) connector->display_info.height_mm = panelInfo->pHeight; return 1; } - + static struct drm_panel_funcs g_hdfDrmPanelFuncs = { .get_modes = HdfDrmPanelGetModes, .enable = HdfDrmPanelEnable, @@ -227,6 +227,7 @@ int32_t HdfDrmPanelEntryInit(struct HdfDeviceObject *object) ret = drm_panel_add(&hdfDrmPanel->panel); if (ret) { HDF_LOGE("%s drm_panel_add() failed", __func__); + hdfDrmPanel = NULL; return ret; } ret = mipi_dsi_attach(dsiDev); diff --git a/model/display/driver/panel/ili9881c_boe.c b/model/display/driver/panel/ili9881c_boe.c index 00a8e478..0a6b8681 100644 --- a/model/display/driver/panel/ili9881c_boe.c +++ b/model/display/driver/panel/ili9881c_boe.c @@ -282,7 +282,7 @@ FAIL: OsalMemFree(ili9881cBoeDev); return HDF_FAILURE; } - + struct HdfDriverEntry g_ili9881cBoeDevEntry = { .moduleVersion = 1, .moduleName = "LCD_ILI9881CBOE", diff --git a/model/display/driver/panel/ili9881c_boe.h b/model/display/driver/panel/ili9881c_boe.h index ce3966a3..d935e60e 100644 --- a/model/display/driver/panel/ili9881c_boe.h +++ b/model/display/driver/panel/ili9881c_boe.h @@ -24,7 +24,7 @@ struct GpioTiming { uint16_t level; uint32_t delay; }; - + struct ResetSeq { uint32_t items; struct GpioTiming *timing; @@ -238,7 +238,7 @@ static uint8_t g_payLoad190[] = { 0x29, 0x00 }; static uint8_t g_payLoad191[] = { 0x35, 0x00 }; static struct DsiCmdDesc g_panelOnCode[] = { - { 0x39, 0x00, sizeof(g_payLoad0), g_payLoad0 }, + { 0x39, 0x00, sizeof(g_payLoad0), g_payLoad0 }, { 0x23, 0x00, sizeof(g_payLoad1), g_payLoad1 }, { 0x23, 0x00, sizeof(g_payLoad2), g_payLoad2 }, { 0x23, 0x00, sizeof(g_payLoad3), g_payLoad3 }, @@ -248,7 +248,7 @@ static struct DsiCmdDesc g_panelOnCode[] = { { 0x23, 0x00, sizeof(g_payLoad7), g_payLoad7 }, { 0x23, 0x00, sizeof(g_payLoad8), g_payLoad8 }, { 0x23, 0x00, sizeof(g_payLoad9), g_payLoad9 }, - { 0x23, 0x00, sizeof(g_payLoad10), g_payLoad10 }, + { 0x23, 0x00, sizeof(g_payLoad10), g_payLoad10 }, { 0x23, 0x00, sizeof(g_payLoad11), g_payLoad11 }, { 0x23, 0x00, sizeof(g_payLoad12), g_payLoad12 }, { 0x23, 0x00, sizeof(g_payLoad13), g_payLoad13 }, diff --git a/model/input/driver/hdf_hid_adapter.c b/model/input/driver/hdf_hid_adapter.c index 3ae65a18..a54cdb5e 100644 --- a/model/input/driver/hdf_hid_adapter.c +++ b/model/input/driver/hdf_hid_adapter.c @@ -253,6 +253,7 @@ void HidUnregisterHdfInputDev(const void *inputDev) { if (inputDev == NULL) { HDF_LOGE("%s: inputDev is null", __func__); + return; } UnregisterInputDevice((InputDevice *)inputDev); }