Skip to content

Commit b658912

Browse files
author
Jiri Kosina
committed
HID: i2c-hid: fix inverted return value from i2c_hid_command()
i2c_hid_command() returns non-zero in error cases (the actual errno). Error handling in for I2C_HID_QUIRK_RESEND_REPORT_DESCR case in i2c_hid_resume() had the check inverted; fix that. Fixes: 3e83eda ("HID: i2c-hid: Fix resume issue on Raydium touchscreen device") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 3e83eda commit b658912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/i2c-hid/i2c-hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ static int i2c_hid_resume(struct device *dev)
12291229
*/
12301230
if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
12311231
ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
1232-
if (!ret)
1232+
if (ret)
12331233
return ret;
12341234
}
12351235

0 commit comments

Comments
 (0)