summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-composite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk-composite.c')
-rw-r--r--drivers/clk/clk-composite.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index 63056b7696..4ebdd399b4 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -181,9 +181,13 @@ struct clk_hw *clk_hw_register_composite(struct device_d *dev,
unsigned long flags)
{
struct clk *clk;
- mux_hw->clk.ops = mux_ops;
- rate_hw->clk.ops = rate_ops;
- gate_hw->clk.ops = gate_ops;
+
+ if (mux_hw)
+ mux_hw->clk.ops = mux_ops;
+ if (rate_hw)
+ rate_hw->clk.ops = rate_ops;
+ if (gate_hw)
+ gate_hw->clk.ops = gate_ops;
parent_names = memdup_array(parent_names, num_parents);
if (!parent_names)