* [PATCH v2] memory: mtk-smi: Handle return value of clk_prepare_enable
@ 2017-08-10 5:17 Arvind Yadav
2017-08-15 15:47 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-10 5:17 UTC (permalink / raw)
To: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
changes in v2:
Rebase patch[1]https://lkml.org/lkml/2017/8/3/968
and apply this change. Otherwise will merge conflict.
drivers/memory/mtk-smi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index 2b798bb..583fb8d 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -315,6 +315,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;
@@ -349,7 +350,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] memory: mtk-smi: Handle return value of clk_prepare_enable
2017-08-10 5:17 [PATCH v2] memory: mtk-smi: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-08-15 15:47 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-08-15 15:47 UTC (permalink / raw)
To: Arvind Yadav
Cc: matthias.bgg, iommu, linux-arm-kernel, linux-mediatek,
linux-kernel
On Thu, Aug 10, 2017 at 10:47:32AM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> changes in v2:
> Rebase patch[1]https://lkml.org/lkml/2017/8/3/968
> and apply this change. Otherwise will merge conflict.
>
> drivers/memory/mtk-smi.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-15 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 5:17 [PATCH v2] memory: mtk-smi: Handle return value of clk_prepare_enable Arvind Yadav
2017-08-15 15:47 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).