From be0e719a6b8e73393bb159b65373d14f19209bdc Mon Sep 17 00:00:00 2001 From: haojl2 Date: Mon, 24 Jun 2019 12:46:14 +0800 Subject: [PATCH] himax_v2_mmi: Stop probe if get power failed TP: If TP power request failed, no need go on probe driver. Change-Id: I999a3b6a8d2381b1cde17b013050db43bbc2ae2a Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1375139 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/input/touchscreen/himax_v2_mmi/himax_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/himax_v2_mmi/himax_common.c b/drivers/input/touchscreen/himax_v2_mmi/himax_common.c index beff2768645f..e21f266d3a00 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/himax_common.c +++ b/drivers/input/touchscreen/himax_v2_mmi/himax_common.c @@ -3104,7 +3104,11 @@ int himax_chip_common_init(void) #ifdef HX_RST_PIN_FUNC ts->rst_gpio = pdata->gpio_reset; #endif - himax_gpio_power_config(pdata); + if (himax_gpio_power_config(pdata)) { + err = -1; + E("%s: himax_gpio_power_config failed, stop Himax probe\n", __func__); + goto err_himax_gpio_power_config_failed; + } #ifndef CONFIG_OF if (pdata->power) { @@ -3326,6 +3330,7 @@ error_ic_detect_failed: #ifndef CONFIG_OF err_power_failed: #endif +err_himax_gpio_power_config_failed: err_alloc_dt_pdata_failed: kfree(hx_touch_data); hx_touch_data = NULL;