Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1949730AbbEBUFy (ORCPT ); Sat, 2 May 2015 16:05:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46588 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948724AbbEBTrn (ORCPT ); Sat, 2 May 2015 15:47:43 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter De Schrijver , Prashant Gaikwad , Thierry Reding Subject: [PATCH 3.14 71/92] clk: tegra: Register the proper number of resets Date: Sat, 2 May 2015 21:03:26 +0200 Message-Id: <20150502190116.889453243@linuxfoundation.org> X-Mailer: git-send-email 2.3.7 In-Reply-To: <20150502190109.683061482@linuxfoundation.org> References: <20150502190109.683061482@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1605 Lines: 45 3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thierry Reding commit 5e43e259171e1eee8bc074d9c44be434e685087b upstream. The number of resets controls is 32 times the number of peripheral register banks rather than 32 times the number of clocks. This reduces (drastically) the number of reset controls registered from 10080 (315 clocks * 32) to 224 (6 peripheral register banks * 32). This also fixes a potential crash because trying to use any of the excess reset controls (224-10079) would have caused accesses beyond the array bounds of the peripheral register banks definition array. Cc: Peter De Schrijver Cc: Prashant Gaikwad Fixes: 6d5b988e7dc5 ("clk: tegra: implement a reset driver") Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman --- drivers/clk/tegra/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/tegra/clk.c +++ b/drivers/clk/tegra/clk.c @@ -266,7 +266,7 @@ void __init tegra_add_of_provider(struct of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); rst_ctlr.of_node = np; - rst_ctlr.nr_resets = clk_num * 32; + rst_ctlr.nr_resets = periph_banks * 32; reset_controller_register(&rst_ctlr); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/