From nobody Mon Sep 28 17:48:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0D8D5352C3C; Wed, 19 Aug 2026 19:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166354; cv=none; b=F9Gz9XjWtP2Agr7OCZwSjziCgaWlwruj4AVc/kjiNS6fKGbf21611m3OKHKkxjTzVmsSQ6k1e6voU5qfPw1vM2T6/yksd4K8NXRIUIewrNDbEBX/s5lWP/fsg0BlhnVa6J2j1rmGWxIuWyrPbdvETd3Oe7DMlmiI18SOZ+xGxCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166354; c=relaxed/simple; bh=cHrUhl3NXtEQc1+Yp2b669YHOyJfFfotxvdbLgQjRs4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O0KSEL7OFOOJMssl1yvlOtBUReHOSqNtCpxUxwwetxv0uKkpBFDOjOEO4wfp34m1vgw5NsOnIDe0sb+x71gwtIyzzbvsCuRDa2UBmLeL9jDbFcnSJP84DqaTjmLmGONRK5s9lr85KmhcMqYi/6qdCE3vVV8wkVT8OQnokvOYT8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4040B1F00A3D; Wed, 19 Aug 2026 19:05:47 +0000 (UTC) From: Geert Uytterhoeven To: Tero Kristo , Stephen Boyd , Brian Masney , Jerome Brunet , Nobuhiro Iwamatsu , Nuno Sa , Guenter Roeck , Michael Hennerich , Antoniu Miclaus , Jonathan Cameron , David Lechner , Andy Shevchenko , Sunny Luo , Xianwei Zhao , Mark Brown , Kees Cook , Kevin Hilman , Mathieu Dubois-Briand Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux@analog.com, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide 1/5] clk: ti: Make sure clk_init_data is fully initialized Date: Wed, 19 Aug 2026 21:05:15 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. _register_mux() fills in init.parent_data, and assumes that init.parent_names is NULL. However, the latter in uninitialized, and thus may cause a crash. Make sure all members are fully initialized, to fix such bugs, and to avoid future breakage when converting drivers to a different method for specifying the parents. Fixes: 667f420c09f1417c ("clk: ti: mux: resolve parent clocks by DT index, = not by name") Closes: https://lore.kernel.org/CAMuHMdU3yVqoyHC4eNF2NuYo8wy+6ODLoYat4R71X9= 9Mxc_=3Dkw@mail.gmail.com Signed-off-by: Geert Uytterhoeven Reviewed-by: Brian Masney Reviewed-by: Mathieu Dubois-Briand --- drivers/clk/ti/adpll.c | 4 ++-- drivers/clk/ti/divider.c | 2 +- drivers/clk/ti/mux.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c index e305fcbac6475b03..8885d28face50beb 100644 --- a/drivers/clk/ti/adpll.c +++ b/drivers/clk/ti/adpll.c @@ -483,7 +483,7 @@ static const struct clk_ops ti_adpll_ops =3D { =20 static int ti_adpll_init_dco(struct ti_adpll_data *d) { - struct clk_init_data init; + struct clk_init_data init =3D {}; struct clk *clock; const char *postfix; int width, err; @@ -576,7 +576,7 @@ static int ti_adpll_init_clkout(struct ti_adpll_data *d, struct clk *clk1) { struct ti_adpll_clkout_data *co; - struct clk_init_data init; + struct clk_init_data init =3D {}; struct clk_ops *ops; const char *parent_names[2]; const char *child_name; diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c index af923b8cb0ed8fbc..3b438c2d68aacd7c 100644 --- a/drivers/clk/ti/divider.c +++ b/drivers/clk/ti/divider.c @@ -311,7 +311,7 @@ static struct clk *_register_divider(struct device_node= *node, u32 flags, struct clk_omap_divider *div) { - struct clk_init_data init; + struct clk_init_data init =3D {}; const char *parent_name; const char *name; =20 diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c index ded4432f7528cc6e..0fef60e82107a5a5 100644 --- a/drivers/clk/ti/mux.c +++ b/drivers/clk/ti/mux.c @@ -124,9 +124,9 @@ static struct clk *_register_mux(struct device_node *no= de, const char *name, struct clk_omap_reg *reg, u8 shift, u32 mask, s8 latch, u8 clk_mux_flags, u32 *table) { + struct clk_init_data init =3D {}; struct clk_omap_mux *mux; struct clk *clk; - struct clk_init_data init; =20 /* allocate the mux */ mux =3D kzalloc_obj(*mux); --=20 2.43.0 From nobody Mon Sep 28 17:48:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 38B0C3C2795; Wed, 19 Aug 2026 19:05:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166360; cv=none; b=Z9zdQFSJkLVChvVZl+9wSyvMYuQ2eYRUYTS8+8NBK4rfzyDtSH/dm0bTknGq72uG6hUlq8JIQjrrh8d3TdmmvZBBMlVksxvQpSiBbXOldXnK454T7fAyHVrIA8gPi420p2zuJB5c/qCSU8k9LfT9y8npEaqUqmYe5tBBzEQcpJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166360; c=relaxed/simple; bh=CW0X4DG/neJfLucuBaNsuwuSs9fPIa1HZFsvO1hvG3o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=COWP9KpyhpNS/JmMt9Kg5jm9JRcu/6eZ/HFxzEEKIshNG1zsY3SwTRiHowjxictyBbhcVXlEx5U8z5oqSf9Z/tm/JmX0xIOQJMZQV6fj/ojOjtnaW2TmZp7kAsPRlZYSlON1OA/jpV88XHOgvWFop3zICqrXb89rew8j0RPBw1I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C3C11F000E9; Wed, 19 Aug 2026 19:05:52 +0000 (UTC) From: Geert Uytterhoeven To: Tero Kristo , Stephen Boyd , Brian Masney , Jerome Brunet , Nobuhiro Iwamatsu , Nuno Sa , Guenter Roeck , Michael Hennerich , Antoniu Miclaus , Jonathan Cameron , David Lechner , Andy Shevchenko , Sunny Luo , Xianwei Zhao , Mark Brown , Kees Cook , Kevin Hilman , Mathieu Dubois-Briand Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux@analog.com, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide 2/5] clk: visconti: Make sure clk_init_data is fully initialized Date: Wed, 19 Aug 2026 21:05:16 +0200 Message-ID: <42dd7be99acbbea1343e2fcc0ba4ffb91f8517ca.1787165329.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. visconti_clk_register_gate() fills in init.parent_data, and assumes that init.parent_names is NULL. However, the latter in uninitialized, and thus may cause a crash. Make sure all members are fully initialized, to fix such bugs, and to avoid future breakage when converting drivers to a different method for specifying the parents. Fixes: b4cbe606dc3674b2 ("clk: visconti: Add support common clock driver an= d reset driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Brian Masney --- Compile-tested only. --- drivers/clk/visconti/clkc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/visconti/clkc.c b/drivers/clk/visconti/clkc.c index d0b193b5d0b35f94..4018d1298880dfbb 100644 --- a/drivers/clk/visconti/clkc.c +++ b/drivers/clk/visconti/clkc.c @@ -81,9 +81,9 @@ static struct clk_hw *visconti_clk_register_gate(struct d= evice *dev, u8 rs_idx, spinlock_t *lock) { + struct clk_init_data init =3D {}; struct visconti_clk_gate *gate; struct clk_parent_data *pdata; - struct clk_init_data init; struct clk_hw *hw; int ret; =20 --=20 2.43.0 From nobody Mon Sep 28 17:48:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9A96C3C2795; Wed, 19 Aug 2026 19:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166365; cv=none; b=DK4qpEo7jznhEV5lGGraIM/sEkRarTNX2kg8XAX/2why0U92nS6RctqSqiXJwWvagia7bMXR0Nf9ARYaHc48aemfDvFRiMeSrP+0CND363X3pC2jWAKyWydTlGrik2+7BVdO/BVZwdC6FzfGlwIlIeRJFzSR48jc+QgbuAv4RpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166365; c=relaxed/simple; bh=V60VAkqsTiosBjLYuza6OEkcbCmQM1IfoY32/nbVJ7E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aOpk2xCfhEj4OUXMugf2/qdiH6d/+sA8Ewa6AUxvd+YdOAqJS0lf9rLsli6tI5mkAzp+NXezgG1BUgoG9nK8BoR1+TxdMB8QUptG/lFVh6fCTFYYeQ5PrYn83dNnjjqaeIiL2TQnnVv3FlrbNv/b9LWqK8VAMzwKSLYNLGlekNA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 121F01F00A3E; Wed, 19 Aug 2026 19:05:58 +0000 (UTC) From: Geert Uytterhoeven To: Tero Kristo , Stephen Boyd , Brian Masney , Jerome Brunet , Nobuhiro Iwamatsu , Nuno Sa , Guenter Roeck , Michael Hennerich , Antoniu Miclaus , Jonathan Cameron , David Lechner , Andy Shevchenko , Sunny Luo , Xianwei Zhao , Mark Brown , Kees Cook , Kevin Hilman , Mathieu Dubois-Briand Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux@analog.com, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide 3/5] hwmon: (ltc4282) Make sure clk_init_data is fully initialized Date: Wed, 19 Aug 2026 21:05:17 +0200 Message-ID: <8ec3c5cbd2df675a938f090470f5da5f22008517.1787165329.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. ltc428_clk_provider_setup() does not fill in any parent clocks, and assumes that init.num_parents is NULL. However, the latter in uninitialized, and thus may cause a crash. Make sure all members are fully initialized, to fix such bugs, and to avoid future breakage when converting drivers to a different method for specifying the parents. Fixes: cbc29538dbf7d740 ("hwmon: Add driver for LTC4282") Signed-off-by: Geert Uytterhoeven Reviewed-by: Brian Masney --- Compile-tested only. --- drivers/hwmon/ltc4282.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c index b1675dc5b3c7fd2f..54ba4b8542e94b7b 100644 --- a/drivers/hwmon/ltc4282.c +++ b/drivers/hwmon/ltc4282.c @@ -1106,7 +1106,7 @@ static const struct clk_ops ltc4282_ops =3D { static int ltc428_clk_provider_setup(struct ltc4282_state *st, struct device *dev) { - struct clk_init_data init; + struct clk_init_data init =3D {}; int ret; =20 if (!IS_ENABLED(CONFIG_COMMON_CLK)) --=20 2.43.0 From nobody Mon Sep 28 17:48:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CF82B37C0F8; Wed, 19 Aug 2026 19:06:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166371; cv=none; b=VeSL0EFvkqK7mpTjvd66mGMzEs7efNc0+4aV8Xe0aeHdgZ9D6seBl6Mqgnbf9NOQGdMdyUbJhCmMv1fcY8Appg7YL3TCKuneY5pVNU/vpsL5sX9n/UZe07KWPZcIhsCRpuP03Nht1qejbxjuacr47Grxa6gjR26AgJmlQoHQWpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166371; c=relaxed/simple; bh=bQbiIir746pDfV9q9WOIX5O5l1kno9nDhkPReNDVlbY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o0Vur4tEVPWN9ymCRp3CciVqtazENeFxQtK5cNQuTd04VnGAzUuSIFBdlEw13u5DdeGc2x6A2CKu+F5LSH8hF4Jh684JHpBVMh61s3AB7S6o/sWuFHbWQRqZgEOgDtRqlhR2DOVGHhwIOE1JmKadElvxvEigyUfUAGNYPLT3igU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 028071F000E9; Wed, 19 Aug 2026 19:06:04 +0000 (UTC) From: Geert Uytterhoeven To: Tero Kristo , Stephen Boyd , Brian Masney , Jerome Brunet , Nobuhiro Iwamatsu , Nuno Sa , Guenter Roeck , Michael Hennerich , Antoniu Miclaus , Jonathan Cameron , David Lechner , Andy Shevchenko , Sunny Luo , Xianwei Zhao , Mark Brown , Kees Cook , Kevin Hilman , Mathieu Dubois-Briand Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux@analog.com, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide 4/5] iio: frequency: adf4377: Make sure clk_init_data is fully initialized Date: Wed, 19 Aug 2026 21:05:18 +0200 Message-ID: <302584628c4c0699239a0218376fe1c11cdc8944.1787165329.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. adf4377_clk_register() fills in init.parent_data, and assumes that init.parent_names is NULL. However, the latter in uninitialized, and thus may cause a crash. Make sure all members are fully initialized, to fix such bugs, and to avoid future breakage when converting drivers to a different method for specifying the parents. Fixes: 60e5448ddbec2dc2 ("iio: frequency: adf4377: add clk provider support= ") Signed-off-by: Geert Uytterhoeven Reviewed-by: Brian Masney --- Compile-tested only. --- drivers/iio/frequency/adf4377.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/frequency/adf4377.c b/drivers/iio/frequency/adf437= 7.c index 4dd19a9aa9943c57..f4eb9ba5878e1893 100644 --- a/drivers/iio/frequency/adf4377.c +++ b/drivers/iio/frequency/adf4377.c @@ -990,7 +990,7 @@ static int adf4377_clk_register(struct adf4377_state *s= t) { struct spi_device *spi =3D st->spi; struct device *dev =3D &spi->dev; - struct clk_init_data init; + struct clk_init_data init =3D {}; struct clk_parent_data parent_data; int ret; =20 --=20 2.43.0 From nobody Mon Sep 28 17:48:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 68A283D34BB; Wed, 19 Aug 2026 19:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166377; cv=none; b=o9g03xg/LGvjhUTLbSahKE/Jjv24XWw58R2WM0jScpA+4/tAI/wQY4mygBGqvJiuGDp0x49UB4r72ab0RT11RaZepFruTJtpxuBnRtm05AWUdXYxtUXsBUPJsvoa7R5UEar9IblasWnDaRZVqHBVOY6A7zwJBrD7/dIq59Tx5nI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787166377; c=relaxed/simple; bh=2p6bAIP0Cei9576iEhGUu60Huw/wlOYnprNMQaC5Ml0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AgjRrm7jl6eqE5tfEglTIBr+mP7q5uMm1v9ZMRUDi2AH78kuSuzhx98zm4xYEumaik+OmmljE/zK7GKzs6+Qc/SXg6IFSrH8rw7ccH425OLP6hcDg7z4RoycmcUkKbHW8rMadQNAadNip70ZutZ912nGpwctzYJyrv7cFWqQHCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DADE91F00A3A; Wed, 19 Aug 2026 19:06:10 +0000 (UTC) From: Geert Uytterhoeven To: Tero Kristo , Stephen Boyd , Brian Masney , Jerome Brunet , Nobuhiro Iwamatsu , Nuno Sa , Guenter Roeck , Michael Hennerich , Antoniu Miclaus , Jonathan Cameron , David Lechner , Andy Shevchenko , Sunny Luo , Xianwei Zhao , Mark Brown , Kees Cook , Kevin Hilman , Mathieu Dubois-Briand Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux@analog.com, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide 5/5] spi: amlogic-spisg: Make sure clk_init_data is fully initialized Date: Wed, 19 Aug 2026 21:05:19 +0200 Message-ID: <9fb35ae0aedb7a6db0db6c78a8193c7602dd9d44.1787165329.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. aml_spisg_clk_init() fills in init.parent_data, and assumes that init.parent_names is NULL. However, the latter in uninitialized, and thus may cause a crash. Make sure all members are fully initialized, to fix such bugs, and to avoid future breakage when converting drivers to a different method for specifying the parents. Fixes: cef9991e04aed330 ("spi: Add Amlogic SPISG driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Brian Masney Reviewed-by: Xianwei Zhao --- Compile-tested only. --- drivers/spi/spi-amlogic-spisg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spis= g.c index afc8af04638d3b6e..9049a87e9d0f2df6 100644 --- a/drivers/spi/spi-amlogic-spisg.c +++ b/drivers/spi/spi-amlogic-spisg.c @@ -636,7 +636,7 @@ static int aml_spisg_target_abort(struct spi_controller= *ctlr) static int aml_spisg_clk_init(struct spisg_device *spisg, void __iomem *ba= se) { struct device *dev =3D &spisg->pdev->dev; - struct clk_init_data init; + struct clk_init_data init =3D {}; struct clk_divider *div; struct clk_div_table *tbl; char name[32]; --=20 2.43.0