diff mbox series

[v2,1/3] clk: ast2600: allow empty entries in aspeed_g6_gates

Message ID db255ca1934f82955df103011ab4c7ad406ba459.1676267865.git.jk@codeconstruct.com.au
State Handled Elsewhere, archived
Headers show
Series Add definitions for AST2600 i3c clocks and resets | expand

Commit Message

Jeremy Kerr Feb. 13, 2023, 6:02 a.m. UTC
We're about to remove an entry from aspeed_g6_gates, but we won't want
to alter existing entries. This change allows empty entries in the gates
array.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
---
 drivers/clk/clk-ast2600.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
index 9c3305bcb27a..1f08ff3c60fa 100644
--- a/drivers/clk/clk-ast2600.c
+++ b/drivers/clk/clk-ast2600.c
@@ -652,6 +652,9 @@  static int aspeed_g6_clk_probe(struct platform_device *pdev)
 		const struct aspeed_gate_data *gd = &aspeed_g6_gates[i];
 		u32 gate_flags;
 
+		if (!gd->name)
+			continue;
+
 		/*
 		 * Special case: the USB port 1 clock (bit 14) is always
 		 * working the opposite way from the other ones.