* [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
@ 2013-05-28 9:06 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-05-28 9:06 UTC (permalink / raw)
To: srinidhi.kasagar, linus.walleij, djbw, vinod.koul
Cc: yongjun_wei, linux-arm-kernel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In many of the error handling case, the return value 'ret' not set
and 0 will be return from d40_probe() even if error, but we should
return a negative error code instead in those error handling case.
This patch fixed them, and also removed useless variable 'err'.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/dma/ste_dma40.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 71bf4ec..cbf9c62 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3474,7 +3474,6 @@ failure:
static int __init d40_probe(struct platform_device *pdev)
{
- int err;
int ret = -ENOENT;
struct d40_base *base;
struct resource *res = NULL;
@@ -3576,6 +3575,7 @@ static int __init d40_probe(struct platform_device *pdev)
if (IS_ERR(base->lcpa_regulator)) {
d40_err(&pdev->dev, "Failed to get lcpa_regulator\n");
base->lcpa_regulator = NULL;
+ ret = PTR_ERR(base->lcpa_regulator);
goto failure;
}
@@ -3590,13 +3590,13 @@ static int __init d40_probe(struct platform_device *pdev)
}
base->initialized = true;
- err = d40_dmaengine_init(base, num_reserved_chans);
- if (err)
+ ret = d40_dmaengine_init(base, num_reserved_chans);
+ if (ret)
goto failure;
base->dev->dma_parms = &base->dma_parms;
- err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
- if (err) {
+ ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
+ if (ret) {
d40_err(&pdev->dev, "Failed to set dma max seg size\n");
goto failure;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
@ 2013-05-28 9:06 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-05-28 9:06 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In many of the error handling case, the return value 'ret' not set
and 0 will be return from d40_probe() even if error, but we should
return a negative error code instead in those error handling case.
This patch fixed them, and also removed useless variable 'err'.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/dma/ste_dma40.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 71bf4ec..cbf9c62 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3474,7 +3474,6 @@ failure:
static int __init d40_probe(struct platform_device *pdev)
{
- int err;
int ret = -ENOENT;
struct d40_base *base;
struct resource *res = NULL;
@@ -3576,6 +3575,7 @@ static int __init d40_probe(struct platform_device *pdev)
if (IS_ERR(base->lcpa_regulator)) {
d40_err(&pdev->dev, "Failed to get lcpa_regulator\n");
base->lcpa_regulator = NULL;
+ ret = PTR_ERR(base->lcpa_regulator);
goto failure;
}
@@ -3590,13 +3590,13 @@ static int __init d40_probe(struct platform_device *pdev)
}
base->initialized = true;
- err = d40_dmaengine_init(base, num_reserved_chans);
- if (err)
+ ret = d40_dmaengine_init(base, num_reserved_chans);
+ if (ret)
goto failure;
base->dev->dma_parms = &base->dma_parms;
- err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
- if (err) {
+ ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
+ if (ret) {
d40_err(&pdev->dev, "Failed to set dma max seg size\n");
goto failure;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
2013-05-28 9:06 ` Wei Yongjun
@ 2013-05-28 16:18 ` Andy Shevchenko
-1 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2013-05-28 16:18 UTC (permalink / raw)
To: Wei Yongjun
Cc: srinidhi.kasagar, Linus Walleij, Dan Williams, Vinod Koul,
yongjun_wei, linux-arm Mailing List, linux-kernel
Have you check the ux500-dma40 branch?
https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/log/?h=ux500-dma40
On Tue, May 28, 2013 at 12:06 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In many of the error handling case, the return value 'ret' not set
> and 0 will be return from d40_probe() even if error, but we should
> return a negative error code instead in those error handling case.
> This patch fixed them, and also removed useless variable 'err'.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/dma/ste_dma40.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 71bf4ec..cbf9c62 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -3474,7 +3474,6 @@ failure:
>
> static int __init d40_probe(struct platform_device *pdev)
> {
> - int err;
> int ret = -ENOENT;
> struct d40_base *base;
> struct resource *res = NULL;
> @@ -3576,6 +3575,7 @@ static int __init d40_probe(struct platform_device *pdev)
> if (IS_ERR(base->lcpa_regulator)) {
> d40_err(&pdev->dev, "Failed to get lcpa_regulator\n");
> base->lcpa_regulator = NULL;
> + ret = PTR_ERR(base->lcpa_regulator);
> goto failure;
> }
>
> @@ -3590,13 +3590,13 @@ static int __init d40_probe(struct platform_device *pdev)
> }
>
> base->initialized = true;
> - err = d40_dmaengine_init(base, num_reserved_chans);
> - if (err)
> + ret = d40_dmaengine_init(base, num_reserved_chans);
> + if (ret)
> goto failure;
>
> base->dev->dma_parms = &base->dma_parms;
> - err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
> - if (err) {
> + ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
> + if (ret) {
> d40_err(&pdev->dev, "Failed to set dma max seg size\n");
> goto failure;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
@ 2013-05-28 16:18 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2013-05-28 16:18 UTC (permalink / raw)
To: linux-arm-kernel
Have you check the ux500-dma40 branch?
https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/log/?h=ux500-dma40
On Tue, May 28, 2013 at 12:06 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In many of the error handling case, the return value 'ret' not set
> and 0 will be return from d40_probe() even if error, but we should
> return a negative error code instead in those error handling case.
> This patch fixed them, and also removed useless variable 'err'.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/dma/ste_dma40.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 71bf4ec..cbf9c62 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -3474,7 +3474,6 @@ failure:
>
> static int __init d40_probe(struct platform_device *pdev)
> {
> - int err;
> int ret = -ENOENT;
> struct d40_base *base;
> struct resource *res = NULL;
> @@ -3576,6 +3575,7 @@ static int __init d40_probe(struct platform_device *pdev)
> if (IS_ERR(base->lcpa_regulator)) {
> d40_err(&pdev->dev, "Failed to get lcpa_regulator\n");
> base->lcpa_regulator = NULL;
> + ret = PTR_ERR(base->lcpa_regulator);
> goto failure;
> }
>
> @@ -3590,13 +3590,13 @@ static int __init d40_probe(struct platform_device *pdev)
> }
>
> base->initialized = true;
> - err = d40_dmaengine_init(base, num_reserved_chans);
> - if (err)
> + ret = d40_dmaengine_init(base, num_reserved_chans);
> + if (ret)
> goto failure;
>
> base->dev->dma_parms = &base->dma_parms;
> - err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
> - if (err) {
> + ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE);
> + if (ret) {
> d40_err(&pdev->dev, "Failed to set dma max seg size\n");
> goto failure;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
2013-05-28 9:06 ` Wei Yongjun
@ 2013-05-29 18:27 ` Linus Walleij
-1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-05-29 18:27 UTC (permalink / raw)
To: Wei Yongjun
Cc: Srinidhi KASAGAR, Dan Williams, Vinod Koul, Wei Yongjun,
linux-arm-kernel, linux-kernel, Lee Jones
On Tue, May 28, 2013 at 11:06 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In many of the error handling case, the return value 'ret' not set
> and 0 will be return from d40_probe() even if error, but we should
> return a negative error code instead in those error handling case.
> This patch fixed them, and also removed useless variable 'err'.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Hm it seems it does not apply on my dma40 branch (the same
as mentioned by Andy):
https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/log/?h=ux500-dma40
I have already queued some 36 patches from this branch into
ARM SoC so it is in -next today (and conflicting with this patch).
Could you rebase it and get Vinod's ACK so I can queue it?
Also pls include Lee Jones on CC.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()
@ 2013-05-29 18:27 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-05-29 18:27 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 28, 2013 at 11:06 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In many of the error handling case, the return value 'ret' not set
> and 0 will be return from d40_probe() even if error, but we should
> return a negative error code instead in those error handling case.
> This patch fixed them, and also removed useless variable 'err'.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Hm it seems it does not apply on my dma40 branch (the same
as mentioned by Andy):
https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/log/?h=ux500-dma40
I have already queued some 36 patches from this branch into
ARM SoC so it is in -next today (and conflicting with this patch).
Could you rebase it and get Vinod's ACK so I can queue it?
Also pls include Lee Jones on CC.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-29 18:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 9:06 [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe() Wei Yongjun
2013-05-28 9:06 ` Wei Yongjun
2013-05-28 16:18 ` Andy Shevchenko
2013-05-28 16:18 ` Andy Shevchenko
2013-05-29 18:27 ` Linus Walleij
2013-05-29 18:27 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.