Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706033 > unrolled thread

[PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-08 07:40 +0200
Last post2017-08-08 10:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-08 07:40 +0200
    Re: [PATCH] memory: mtk-smi: Handle return value of  clk_prepare_enable Honghui Zhang <honghui.zhang@mediatek.com> - 2017-08-08 10:40 +0200

#1706033 — [PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-08 07:40 +0200
Subject[PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable
Message-ID<uc5pf-3kw-1@gated-at.bofh.it>
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 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 4afbc41..edf36f0 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -321,6 +321,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev)
 	struct resource *res;
 	const struct of_device_id *of_id;
 	enum mtk_smi_gen smi_gen;
+	int ret;
 
 	if (!dev->pm_domain)
 		return -EPROBE_DEFER;
@@ -359,7 +360,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

[toc] | [next] | [standalone]


#1706158 — Re: [PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable

FromHonghui Zhang <honghui.zhang@mediatek.com>
Date2017-08-08 10:40 +0200
SubjectRe: [PATCH] memory: mtk-smi: Handle return value of clk_prepare_enable
Message-ID<uc8ds-5nN-21@gated-at.bofh.it>
In reply to#1706033
On Tue, 2017-08-08 at 11:06 +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>
> ---

Hi, Arvind,
please rebase this to my latest patchset[1], it's been applied by Joerg.
And please send this one to Joerg and iommu mail list.

otherwise:
Acked-by: Honghui Zhang <honghui.zhang@mediatek.com>

[1]https://lkml.org/lkml/2017/8/3/968

Thanks.
>  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 4afbc41..edf36f0 100644
> --- a/drivers/memory/mtk-smi.c
> +++ b/drivers/memory/mtk-smi.c
> @@ -321,6 +321,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev)
>  	struct resource *res;
>  	const struct of_device_id *of_id;
>  	enum mtk_smi_gen smi_gen;
> +	int ret;
>  
>  	if (!dev->pm_domain)
>  		return -EPROBE_DEFER;
> @@ -359,7 +360,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);

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web