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

Commit 0852e7e7 authored by Shantanu Jain's avatar Shantanu Jain Committed by Sudhakar Manapati
Browse files

input: touchscreen: Correct return value check in Goodix driver



Correct return value check of gtp_read_fw_version, called in probe
of the Goodix driver. The return value is actually the number of
registers read through gtp_i2c_read() function call.
Also change the error message of gtp_check_product_id.

This patch is propagated from msm-3.10 kernel.
(commit: e62e80dc7d23333b7665d5dbff24505584d5d0a3
input: touchscreen: Correct return value check in Goodix driver)

Change-Id: I0b643e250a487f08a19555237802b020b0873d1a
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent fbc7a39a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1063,7 +1063,7 @@ static int gtp_check_product_id(struct i2c_client *client)

	ret = gtp_i2c_read(client, buf, sizeof(buf));
	if (ret < 0) {
		dev_err(&client->dev, "GTP read version failed.\n");
		dev_err(&client->dev, "GTP read product_id failed.\n");
		return -EIO;
	}

@@ -1746,7 +1746,7 @@ static int goodix_ts_probe(struct i2c_client *client,
		dev_info(&client->dev, "GTP works in interrupt mode.\n");

	ret = gtp_read_fw_version(client, &version_info);
	if (ret != 0)
	if (ret != 2)
		dev_err(&client->dev, "GTP firmware version read failed.\n");

	ret = gtp_check_product_id(client);