summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 37d623c7b73b..eb2f9be9b9aa 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1459,11 +1459,14 @@ static void clk_core_init_rate_req(struct clk_core * const core,
{
struct clk_core *parent;
- if (!core || WARN_ON(!req))
+ if (WARN_ON(!req))
return;
memset(req, 0, sizeof(*req));
+ if (!core)
+ return;
+
req->rate = rate;
clk_core_get_boundaries(core, &req->min_rate, &req->max_rate);