input: touchscreen: gt1x: return error when initialization fails

Type: Fix
Redmine ID: #N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ib6d46df548e0448855e6088bc2e8fa2f7df2d352
This commit is contained in:
Zhibin Huang
2025-05-26 10:45:24 +08:00
committed by Tao Huang
parent 2e1afa3ce5
commit 82a3cc4aed

View File

@@ -2354,18 +2354,21 @@ s32 gt1x_init(void)
ret = gt1x_get_chip_type();
if (ret != 0) {
GTP_ERROR("Get chip type failed!");
goto init_err;
}
/* read version information */
ret = gt1x_read_version(&gt1x_version);
if (ret != 0) {
GTP_ERROR("Get verision failed!");
goto init_err;
}
/* init and send configs */
ret = gt1x_init_panel();
if (ret != 0) {
GTP_ERROR("Init panel failed.");
goto init_err;
}
gt1x_workqueue = create_singlethread_workqueue("gt1x_workthread");
@@ -2403,6 +2406,8 @@ s32 gt1x_init(void)
#if GTP_WITH_STYLUS
gt1x_pen_init();
#endif
init_err:
if (ret != 0)
gt1x_power_switch(SWITCH_OFF);