mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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:
@@ -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(>1x_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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user