aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorDmitry Torokhov <[email protected]>2024-10-19 00:17:48 +0000
committerDmitry Torokhov <[email protected]>2024-10-25 01:38:07 +0000
commitbffdf9d7e51a7be8eeaac2ccf9e54a5fde01ff65 (patch)
tree1564ea5cedcb5f5d5e425a81381762d6ed88fbb6 /drivers/platform/x86/intel/pmt/class.c
parentInput: zinitix - don't fail if linux,keycodes prop is absent (diff)
downloadkernel-bffdf9d7e51a7be8eeaac2ccf9e54a5fde01ff65.tar.gz
kernel-bffdf9d7e51a7be8eeaac2ccf9e54a5fde01ff65.zip
Input: edt-ft5x06 - fix regmap leak when probe fails
The driver neglects to free the instance of I2C regmap constructed at the beginning of the edt_ft5x06_ts_probe() method when probe fails. Additionally edt_ft5x06_ts_remove() is freeing the regmap too early, before the rest of the device resources that are managed by devm are released. Fix this by installing a custom devm action that will ensure that the regmap is released at the right time during normal teardown as well as in case of probe failure. Note that devm_regmap_init_i2c() could not be used because the driver may replace the original regmap with a regmap specific for M06 devices in the middle of the probe, and using devm_regmap_init_i2c() would result in releasing the M06 regmap too early. Reported-by: Li Zetao <[email protected]> Fixes: 9dfd9708ffba ("Input: edt-ft5x06 - convert to use regmap API") Cc: [email protected] Reviewed-by: Oliver Graute <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions