From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B7CB1A76A1; Tue, 30 Jul 2024 17:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360332; cv=none; b=Zs9Hdt+LG23AHTtYPoQvBu4xrFfgyW1GE4qJUjAWcADz6Cu+QfFVCHgjPxwtK7D/C3C75vy+Gme1VsQ38QFBAHv2r/3CUEx8VHwS9KnTB5u2Guks3lG2TVqSCpZgcdi0EUdYxv/faCfOi5QaidFaWSWbfTg70SWWyhTGG2YN/tY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360332; c=relaxed/simple; bh=ArkT5sQJ8woeTfXUZdNFQdlxdx5xBNlMRn1dfpKaoz4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MYm4xh8i7QyVGcKjulb+3YiIB2iG1Qg/dcw3jrzOmjdu/vJY/MfFRjzHiDfGQj6LTmTE9ybpy2RLXykjStSghpbF+nEla4Eme668omx6RpOvQQfShyNA6tHqAMlyXi6Awxv74HVDpsC+W2PCCyP1UGzf/6oLQttIxyOB1SLeGp8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=10csClss; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="10csClss" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 925B5C4AF0E; Tue, 30 Jul 2024 17:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722360332; bh=ArkT5sQJ8woeTfXUZdNFQdlxdx5xBNlMRn1dfpKaoz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=10csClssPJtDteZC3FBmhzkdb+Fn+v1J2BiQTsAXeaTbkg4tE+4xDdi0+ZicvyzwN G6JX5QS73AoFzIukKAjpl7U9lfG6zHuiwzeRBC61GL8agDLGzYelcMOHu9JE2Gyo5E nTXzhoFNpkuIlDxFcvsHxs8z2X9BiLLZhb4U9Zg8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bastien Curutchet , David Lechner , Stephen Boyd Subject: [PATCH 6.10 659/809] clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use Date: Tue, 30 Jul 2024 17:48:55 +0200 Message-ID: <20240730151750.919564922@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151724.637682316@linuxfoundation.org> References: <20240730151724.637682316@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bastien Curutchet commit a83b22754e351f13fb46596c85f667dc33da71ec upstream. The flag attribute of the struct clk_init_data isn't initialized before the devm_clk_hw_register() call. This can lead to unexpected behavior during registration. Initialize the entire clk_init_data to zero at declaration. Cc: stable@vger.kernel.org Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks") Signed-off-by: Bastien Curutchet Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20240718115534.41513-1-bastien.curutchet@bootlin.com Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/davinci/da8xx-cfgchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/clk/davinci/da8xx-cfgchip.c +++ b/drivers/clk/davinci/da8xx-cfgchip.c @@ -508,7 +508,7 @@ da8xx_cfgchip_register_usb0_clk48(struct const char * const parent_names[] = { "usb_refclkin", "pll0_auxclk" }; struct clk *fck_clk; struct da8xx_usb0_clk48 *usb0; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; fck_clk = devm_clk_get(dev, "fck"); @@ -583,7 +583,7 @@ da8xx_cfgchip_register_usb1_clk48(struct { const char * const parent_names[] = { "usb0_clk48", "usb_refclkin" }; struct da8xx_usb1_clk48 *usb1; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; usb1 = devm_kzalloc(dev, sizeof(*usb1), GFP_KERNEL);