Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77ab5456 authored by Shantanu Jain's avatar Shantanu Jain Committed by Sudhakar Manapati
Browse files

input: ft5x06_ts: Handle error if i2c read fails



Handle error if i2c read fails and undo other
probe initializations.

  This patch is propagated from 3.4 kernel
    commit: 3da65208df377156825f8a22fade7d8cb0a730ce

Change-Id: I26180b057b45f4dad123dd3581e5c5f2b33a32aa
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent 8a123ff1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1308,7 +1308,7 @@ static int ft5x06_ts_probe(struct i2c_client *client,
	err = ft5x06_i2c_read(client, &reg_addr, 1, &reg_value, 1);
	if (err < 0) {
		dev_err(&client->dev, "version read failed");
		return err;
		goto free_reset_gpio;
	}

	dev_info(&client->dev, "Device ID = 0x%x\n", reg_value);