]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.68/usb-host-fix-incorrect-updating-of-offset.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.68 / usb-host-fix-incorrect-updating-of-offset.patch
1 From 1d5a31582ef046d3b233f0da1a68ae26519b2f0a Mon Sep 17 00:00:00 2001
2 From: Colin Ian King <colin.king@canonical.com>
3 Date: Tue, 7 Nov 2017 16:45:04 +0000
4 Subject: usb: host: fix incorrect updating of offset
5
6 From: Colin Ian King <colin.king@canonical.com>
7
8 commit 1d5a31582ef046d3b233f0da1a68ae26519b2f0a upstream.
9
10 The variable temp is incorrectly being updated, instead it should
11 be offset otherwise the loop just reads the same capability value
12 and loops forever. Thanks to Alan Stern for pointing out the
13 correct fix to my original fix. Fix also cleans up clang warning:
14
15 drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp'
16 is never read
17
18 Fixes: d49d43174400 ("USB: misc ehci updates")
19 Signed-off-by: Colin Ian King <colin.king@canonical.com>
20 Acked-by: Alan Stern <stern@rowland.harvard.edu>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/usb/host/ehci-dbg.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/drivers/usb/host/ehci-dbg.c
28 +++ b/drivers/usb/host/ehci-dbg.c
29 @@ -837,7 +837,7 @@ static ssize_t fill_registers_buffer(str
30 default: /* unknown */
31 break;
32 }
33 - temp = (cap >> 8) & 0xff;
34 + offset = (cap >> 8) & 0xff;
35 }
36 }
37 #endif