summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-05-31 12:25:54 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-03 12:08:14 +0200
commit761d031ec95b09f4126748a4849b3dabe3c00427 (patch)
tree7ac437eb73660595978cae2c5f7f75a8a3d5c5e5 /drivers/memory
parentspmi: spmi-pmic-arb: enable the SPMI interrupt as a wakeup source (diff)
downloadlinux-761d031ec95b09f4126748a4849b3dabe3c00427.tar.xz
linux-761d031ec95b09f4126748a4849b3dabe3c00427.zip
memory: ti-aemif: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/ti-aemif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index 22c1aeeb6421..2744b1b91b57 100644
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -357,7 +357,10 @@ static int aemif_probe(struct platform_device *pdev)
return PTR_ERR(aemif->clk);
}
- clk_prepare_enable(aemif->clk);
+ ret = clk_prepare_enable(aemif->clk);
+ if (ret)
+ return ret;
+
aemif->clk_rate = clk_get_rate(aemif->clk) / MSEC_PER_SEC;
if (of_device_is_compatible(np, "ti,da850-aemif"))