summaryrefslogtreecommitdiff
path: root/drivers/clk/clk-max77686.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-12-18 11:43:45 +0400
committerMike Turquette <mturquette@linaro.org>2013-01-12 06:55:36 +0400
commit9f58b9b9fe3646421d9de251a4c5eec6d299a395 (patch)
tree6f5567abbc780d5eedbc10e2bf89558e6ccff38a /drivers/clk/clk-max77686.c
parentbab53301c3846ae9a5e1142dca2976f434f70481 (diff)
downloadlinux-9f58b9b9fe3646421d9de251a4c5eec6d299a395.tar.xz
clk: max77686: Fix return value checking for devm_kzalloc
devm_kzalloc returns NULL on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk-max77686.c')
-rw-r--r--drivers/clk/clk-max77686.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c
index d098f72e1d5f..894421417000 100644
--- a/drivers/clk/clk-max77686.c
+++ b/drivers/clk/clk-max77686.c
@@ -132,7 +132,7 @@ static int max77686_clk_register(struct device *dev,
max77686->lookup = devm_kzalloc(dev, sizeof(struct clk_lookup),
GFP_KERNEL);
- if (IS_ERR(max77686->lookup))
+ if (!max77686->lookup)
return -ENOMEM;
max77686->lookup->con_id = hw->init->name;
@@ -151,13 +151,13 @@ static int max77686_clk_probe(struct platform_device *pdev)
max77686_clks = devm_kzalloc(&pdev->dev, sizeof(struct max77686_clk *)
* MAX77686_CLKS_NUM, GFP_KERNEL);
- if (IS_ERR(max77686_clks))
+ if (!max77686_clks)
return -ENOMEM;
for (i = 0; i < MAX77686_CLKS_NUM; i++) {
max77686_clks[i] = devm_kzalloc(&pdev->dev,
sizeof(struct max77686_clk), GFP_KERNEL);
- if (IS_ERR(max77686_clks[i]))
+ if (!max77686_clks[i])
return -ENOMEM;
}