Received: by 10.223.185.116 with SMTP id b49csp6344050wrg; Wed, 28 Feb 2018 07:55:34 -0800 (PST) X-Google-Smtp-Source: AH8x2271PZU5Qj4V6a+wWU7wzESyybGbEvRkHG6lIZCTVrB2N9YoxxOq7KHIoDnWcf0FnQHkxpqt X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr18346740plr.109.1519833334652; Wed, 28 Feb 2018 07:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833334; cv=none; d=google.com; s=arc-20160816; b=qe0yHAZt4o32B9YVCDL43QnQDqugHt411cNYIQBa3uoFtlEEYCFtiPGNluoB1cO+Qf 893a1wtpuSeMQ9OOeLNpz/HQ0PDg/vAGIq5RnjYl+17OypAeYRQua8PSBud2Z35ClbCY annCHHbv+sbKAIUiuPqCNmbLBs0MEqnrl72kXvnhh/Hv/yKTafb3YnL+xu7HdhMqGEmW xv0rdmVTLLfmTIj37DwmubLwtSdV/5u+o4l9W9P++BsViRD3oXa13LQUwTGcIP37A18u +boMKcBz9G3XS3RYC4GPwWTbhYyIgHXD8IKqLEMRcfNawCFMDyJYI+l5yiL9EzB4bupk ZPCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=GiABRYF/qz1faShJdSgcL+bK32w3OMIjG4IygKADs3k=; b=u2VYisGeEC+LT3Hd1V8T2MFu8e8q14bp/46pVHovx9d3ztZ+DzMNsow3Cc+bnywq2X H/id9u3zocE8ZCrzXDa3gofYYjR2DjFVkxvLYUCNIxF81BtGYitzLQVSxNdH6oQIleuz vKm89Eqjx/cd060wN+SBuGAcW+r4zQoqsIcb0TTym+QG5vaRn5M/vXjVBYgEaQ619z+R ei9tyUJZMO2FFE9OgUpsCQlf37tLPDhstqekk4ZFgn9g0gGA7pX0Je3/v+hAPaBXfRKF XjNwod8BGffOKKWY67rBM83DByqbuSYHx+Wy/o/jakKYB0TTF7GI7bR30J9v9bgaqJ03 Woaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n18si1415833pfj.58.2018.02.28.07.55.19; Wed, 28 Feb 2018 07:55:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934033AbeB1Pxd (ORCPT + 99 others); Wed, 28 Feb 2018 10:53:33 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34454 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933975AbeB1Px3 (ORCPT ); Wed, 28 Feb 2018 10:53:29 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yv-0006XP-2r; Wed, 28 Feb 2018 15:22:33 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yd-0008Ns-GZ; Wed, 28 Feb 2018 15:22:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Greg Kroah-Hartman" , "Colin Ian King" , "Alan Stern" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 022/254] usb: host: fix incorrect updating of offset In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Colin Ian King commit 1d5a31582ef046d3b233f0da1a68ae26519b2f0a upstream. The variable temp is incorrectly being updated, instead it should be offset otherwise the loop just reads the same capability value and loops forever. Thanks to Alan Stern for pointing out the correct fix to my original fix. Fix also cleans up clang warning: drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp' is never read Fixes: d49d43174400 ("USB: misc ehci updates") Signed-off-by: Colin Ian King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- drivers/usb/host/ehci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -850,7 +850,7 @@ static ssize_t fill_registers_buffer(str default: /* unknown */ break; } - temp = (cap >> 8) & 0xff; + offset = (cap >> 8) & 0xff; } } #endif