Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933276AbcJUJSm (ORCPT ); Fri, 21 Oct 2016 05:18:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46804 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933256AbcJUJSg (ORCPT ); Fri, 21 Oct 2016 05:18:36 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marcin Wojtas , Stephen Boyd Subject: [PATCH 4.7 16/45] clk: mvebu: fix setting unwanted flags in CP110 gate clock Date: Fri, 21 Oct 2016 11:17:36 +0200 Message-Id: <20161021091428.131283524@linuxfoundation.org> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161021091427.214431885@linuxfoundation.org> References: <20161021091427.214431885@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1223 Lines: 37 4.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marcin Wojtas commit ad715b268a501533ecb2e891a624841d1bb5137c upstream. Armada CP110 system controller comprises its own routine responsble for registering gate clocks. Among others 'flags' field in struct clk_init_data was not set, using a random values, which may cause an unpredicted behavior. This patch fixes the problem by resetting all fields of clk_init_data before assigning values for all gated clocks of Armada 7k/8k SoCs family. Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...") Signed-off-by: Marcin Wojtas Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/mvebu/cp110-system-controller.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/clk/mvebu/cp110-system-controller.c +++ b/drivers/clk/mvebu/cp110-system-controller.c @@ -142,6 +142,8 @@ static struct clk *cp110_register_gate(c if (!gate) return ERR_PTR(-ENOMEM); + memset(&init, 0, sizeof(init)); + init.name = name; init.ops = &cp110_gate_ops; init.parent_names = &parent_name;