summaryrefslogtreecommitdiff
path: root/drivers/memory/mtk-smi.c
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-10 08:17:32 +0300
committerJoerg Roedel <jroedel@suse.de>2017-08-15 18:46:23 +0300
commit46cc815d6d8c3c9dd18ffae1e3e818eb3ce2c788 (patch)
tree6ad2fac75e85f4ee67aa4d2e91aaaa88af475f5d /drivers/memory/mtk-smi.c
parent611de8fcf7f62718bcf9d0469ac84d66e6d89348 (diff)
downloadlinux-46cc815d6d8c3c9dd18ffae1e3e818eb3ce2c788.tar.xz
memory: mtk-smi: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/memory/mtk-smi.c')
-rw-r--r--drivers/memory/mtk-smi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index a3ff19aed087..13f8c45dbf0d 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -327,6 +327,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev)
struct mtk_smi *common;
struct resource *res;
enum mtk_smi_gen smi_gen;
+ int ret;
if (!dev->pm_domain)
return -EPROBE_DEFER;
@@ -361,7 +362,9 @@ static int mtk_smi_common_probe(struct platform_device *pdev)
if (IS_ERR(common->clk_async))
return PTR_ERR(common->clk_async);
- clk_prepare_enable(common->clk_async);
+ ret = clk_prepare_enable(common->clk_async);
+ if (ret)
+ return ret;
}
pm_runtime_enable(dev);
platform_set_drvdata(pdev, common);