Skip to content

Commit

Permalink
drivers: k6_focaltech_3658u: Free vcc_i2c if valid
Browse files Browse the repository at this point in the history
If this GPIO is not freed, and the FTS driver loads before the goodix
one (situation that can happen depending on the Makefile order and
device's defconfig), the goodix driver will not be able to use this
GPIO.

Change-Id: Ic81f7f601b30743c7ec1054a7243cf893e99e5f4
Signed-off-by: danielml <[email protected]>
  • Loading branch information
danielml3 authored and itsshashanksp committed Jun 29, 2024
1 parent 809d385 commit 60f7550
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/input/touchscreen/k6_focaltech_3658u/focaltech_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,8 @@ err_power_init:fts_power_source_exit(ts_data);
gpio_free(ts_data->pdata->reset_gpio);
if (gpio_is_valid(ts_data->pdata->irq_gpio))
gpio_free(ts_data->pdata->irq_gpio);
if (gpio_is_valid(ts_data->pdata->vcc_i2c))
gpio_free(ts_data->pdata->vcc_i2c);
err_gpio_config:kfree_safe(ts_data->touch_buf);
err_buffer_init:input_unregister_device(ts_data->input_dev);

Expand Down

0 comments on commit 60f7550

Please sign in to comment.