summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhimanyu Kapur <abhimany@codeaurora.org>2015-07-21 18:49:09 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:19:40 -0700
commit848dca3bc39b6cb115bc34ec8212109d23fac2df (patch)
treeb0c836487173180099b6953dd87d6ed5223122c2
parentc30f487d8e7c46874a494085d394e50421a8f370 (diff)
clk: msm: msm-clock-controller: check for null along with error
While parsing the device tree node, perform a null check along with the error check by substituting IS_ERR with IS_ERR_OR_NULL on the parser pointer. CRs-Fixed: 971705 Change-Id: Id91981be0cdc135099b8e3d9866549268ab237a3 Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
-rw-r--r--drivers/clk/msm/msm-clock-controller.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/msm/msm-clock-controller.c b/drivers/clk/msm/msm-clock-controller.c
index edce15bc3471..cbe52555264d 100644
--- a/drivers/clk/msm/msm-clock-controller.c
+++ b/drivers/clk/msm/msm-clock-controller.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -455,7 +455,7 @@ void *msmclk_parse_dt_node(struct device *dev, struct device_node *np)
}
parser = msmclk_parser_lookup(np);
- if (IS_ERR(parser)) {
+ if (IS_ERR_OR_NULL(parser)) {
dt_err(np, "no parser found\n");
return ERR_PTR(-EINVAL);
}