Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9043546pxu; Mon, 28 Dec 2020 05:15:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwl8NPGgSlFl8euf4hFsH71MZNx28nM6dDY+NFQ5igX8XpYaDIiyBUfIDHIIK0OuwBjbWxx X-Received: by 2002:a17:906:cd14:: with SMTP id oz20mr38716728ejb.99.1609161318548; Mon, 28 Dec 2020 05:15:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161318; cv=none; d=google.com; s=arc-20160816; b=ilbKuobVzJiWX1SgXnxh4MAFYTy34xxFPYk4rGDsG1kfeoZhVcgK7ayUT2SaXKZKBK jz54gk28QvZc/A7l6vP8wpo5lM5YGu0Bz/n2mODDyHiPayUhqt11/cngKzB7IsB+7P0Z hzW5H7eYPkJ7ERcWrap5nmARta5uWRUbVH0AeQ7HioQeb4g9YjPLS0+xvHT2Y9IirZO0 +il3yiEMVvXlLh/MvikXQr7CophTopZbeyhy4lDKmG0RULaHK6vX5mN/3PF6U1L2Qf/r LPejVdrpOst9oCznerU0WK+sbYi90e58aoI14Be/D9Etw9dCzUUC3qDWWkbB1CxqX5Yh ljNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S+aSz410QBxBkzDdV4sVVohYU47v8I/AiJ9Xg/AoPDk=; b=Alyj6gxiXSIJMtRLiM/FIuKHk8iUNAiXNZYhHTaeFyoNgMz0ZPpCRO3h31G+Gl0Tno Ok3+s5vQupYP+nj/HXMpkA0PusAdGwD5IlKIiISuUeDGgaq3qcnZ7AipL8YtWVxiJxS5 uJaGp9wW8wewUW+km5ltn2MZQZqAeSn1RooUBx/kiUXTSpeugMLVm7DTiaqfA3YYG9zh RpoK42QRlrWjcfxzarvj14dlgiU+dtvKgqkX+JmB6EB7AHB8lB0LmkyXI1vubgHUkad8 Y7bp9LinW9TlX78aZRTUtGTho8kKw+OB33NRecmL+JqymE858sbdKjUoPQJMp9Sjycul Z0zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EdTDrrEc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si20934373edy.450.2020.12.28.05.14.55; Mon, 28 Dec 2020 05:15:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EdTDrrEc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730884AbgL1NM4 (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:39170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731651AbgL1NLQ (ORCPT ); Mon, 28 Dec 2020 08:11:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0766207F7; Mon, 28 Dec 2020 13:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161036; bh=E/Z9LZvYqn6ru0ZTP8p5p0hAmmDNU8np5PX/xj12fY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdTDrrEco8Dt5fzGqppkkDjHsBSXx6Cb6sVcPi+dIhEnETJ+JpC7O7W9Cx2j0qqUu biFNHPZDr5Jg3+es5CqKUxpgYZT/NYdkB9ZdkGbhfu6EBolJ2NSVsPg49/ZHwdhyFJ 51EZDYaHQYtznn/tAzphh5Uio8mo60k1q4GT/XRk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolin Chen , Thierry Reding Subject: [PATCH 4.14 048/242] soc/tegra: fuse: Fix index bug in get_process_id Date: Mon, 28 Dec 2020 13:47:33 +0100 Message-Id: <20201228124907.045853542@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolin Chen commit b9ce9b0f83b536a4ac7de7567a265d28d13e5bea upstream. This patch simply fixes a bug of referencing speedos[num] in every for-loop iteration in get_process_id function. Fixes: 0dc5a0d83675 ("soc/tegra: fuse: Add Tegra210 support") Cc: Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman --- drivers/soc/tegra/fuse/speedo-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/soc/tegra/fuse/speedo-tegra210.c +++ b/drivers/soc/tegra/fuse/speedo-tegra210.c @@ -105,7 +105,7 @@ static int get_process_id(int value, con unsigned int i; for (i = 0; i < num; i++) - if (value < speedos[num]) + if (value < speedos[i]) return i; return -EINVAL;