]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2018 10:28:07 +0000 (12:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2018 10:28:07 +0000 (12:28 +0200)
added patches:
hid-i2c-hid-fix-inverted-return-value-from-i2c_hid_command.patch

queue-4.16/hid-i2c-hid-fix-inverted-return-value-from-i2c_hid_command.patch [new file with mode: 0644]
queue-4.16/series

diff --git a/queue-4.16/hid-i2c-hid-fix-inverted-return-value-from-i2c_hid_command.patch b/queue-4.16/hid-i2c-hid-fix-inverted-return-value-from-i2c_hid_command.patch
new file mode 100644 (file)
index 0000000..333ce61
--- /dev/null
@@ -0,0 +1,34 @@
+From b658912cb023cd6f8e46963d29779903d3c10538 Mon Sep 17 00:00:00 2001
+From: Jiri Kosina <jkosina@suse.cz>
+Date: Thu, 19 Apr 2018 09:25:15 +0200
+Subject: HID: i2c-hid: fix inverted return value from i2c_hid_command()
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit b658912cb023cd6f8e46963d29779903d3c10538 upstream.
+
+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: 3e83eda467 ("HID: i2c-hid: Fix resume issue on Raydium touchscreen device")
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Cc: Aaron Ma <aaron.ma@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/i2c-hid/i2c-hid.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hid/i2c-hid/i2c-hid.c
++++ b/drivers/hid/i2c-hid/i2c-hid.c
+@@ -1229,7 +1229,7 @@ static int i2c_hid_resume(struct device
+        */
+       if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
+               ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
+-              if (!ret)
++              if (ret)
+                       return ret;
+       }
index 3abc9530a2a19e6920ac944b59c7d37ef51a517e..0fe36a12392fdd0479a8ae2692e4ee1b190654fb 100644 (file)
@@ -192,3 +192,4 @@ device-dax-allow-map_sync-to-succeed.patch
 autofs-mount-point-create-should-honour-passed-in-mode.patch
 mm-filemap.c-fix-null-pointer-in-page_cache_tree_insert.patch
 drm-i915-gvt-init-mmio-by-lri-command-in-vgpu-inhibit-context.patch
+hid-i2c-hid-fix-inverted-return-value-from-i2c_hid_command.patch