Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9213106pxu; Mon, 28 Dec 2020 09:26:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT/PW9P0DmpwbYHzsF7HyiuKaUioS5bCiT1f95Ubfye5bOzgBkBpkeh1+is9f4zxoHCWLH X-Received: by 2002:a17:906:b09a:: with SMTP id x26mr17610225ejy.199.1609176373368; Mon, 28 Dec 2020 09:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609176373; cv=none; d=google.com; s=arc-20160816; b=quWx0ULZLkkfARWiCVh1I/S9elKGJFtQiEZ5TITSIbEPQt6RKxM1+DV8FHCDEM9CVw guSAa/KjZuTramV1B5STYy+VP1CapHmtgqyuKiYtCHEnVtO49KP8v/D73S5G5z269vA3 B6/izvVjQxW2gUDlauWEhEJyeqfKUCXGVO67ODsVcf3VgHBGrafUhEdEpkG6um0bki3N 3yaYgrS+Qu5udRq6r71AGW0bEiSXH//cu+kxMU97yhOBhRyxVqecHH1yWaQABAtBGuW9 4hEWBjkRM1XMBJpmlKHisQsa2f/DN5E+g1T7zwW/UTUTaNsapbK7ypNp/gDd/ZW6xOcp 3vUg== 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=MITTVs2qL6TAZ7oSxl/MKs4SqqH7i5aTDVVdtIydFDDqxlPQRzw9EdNtmuNGgzhLPn ZWgz5K9WUjRkHpt8Uou+j1DUxdaGKvSC/LgGygbaHW3uBY7XNFVL0VpQBBfkT4NDAz8Z qcT3R/SRy4IW9gw/e5VO80bYgqvjj96CgIONe2yaZZZA2VaIwVcWi18UhQOOheqL1m6y 0+Y/o5J/pnMD7agaKuK3DcGOWXQ7m4nUKhHQFjlUIX5+1ZNVSj4b+UbZN/6tNT1gS4RM Tw2o0NNy4TZJ+6ZyT+UU9N2q82vIkPhDXxpdVk/yDynlf5YyZcEwm+zskHFXcUs7+xXB yYtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S1XcWnDc; 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 cb6si19167134ejb.459.2020.12.28.09.25.51; Mon, 28 Dec 2020 09:26:13 -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=S1XcWnDc; 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 S1729480AbgL1NAa (ORCPT + 99 others); Mon, 28 Dec 2020 08:00:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:56704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729449AbgL1NA2 (ORCPT ); Mon, 28 Dec 2020 08:00:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F3C4208B6; Mon, 28 Dec 2020 12:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160388; bh=E/Z9LZvYqn6ru0ZTP8p5p0hAmmDNU8np5PX/xj12fY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S1XcWnDcnVqq+exDbV9dJoOXrzx2g1tQf9G8uEMLwpdKg25nXmXYafckl5QPWItb4 i3vueRtyplNvoYR1hIBFhte1fmV+QbXzZOl0B2/98L9WyKZ1S2VvEn3n8FPAdxTP0x 2Ys+numTQDJQuutfZaewKm6T0uKQkzd+2STpdhu4= 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.9 035/175] soc/tegra: fuse: Fix index bug in get_process_id Date: Mon, 28 Dec 2020 13:48:08 +0100 Message-Id: <20201228124854.954985096@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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;