[PATCH v9 47/55] Input: Atmel: improve error handling in mxt_update_cfg()
From: Jiada Wang
Date: Wed Mar 25 2020 - 09:36:52 EST
From: Deepak Das <deepak_das@xxxxxxxxxx>
mxt_update_cfg() failed to propagate the error
code from mxt_init_t7_power_cfg() so return the error code.
Signed-off-by: Deepak Das <deepak_das@xxxxxxxxxx>
Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx>
Signed-off-by: Jiada Wang <jiada_wang@xxxxxxxxxx>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 258dcd8a68e5..069a532bd0b2 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2185,7 +2185,9 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *fw)
dev_info(dev, "Config successfully updated\n");
/* T7 config may have changed */
- mxt_init_t7_power_cfg(data);
+ ret = mxt_init_t7_power_cfg(data);
+ if (ret)
+ dev_warn(dev, "Power Config failed to update\n");
release_mem:
kfree(cfg.mem);
--
2.17.1