From: Tony Lindgren <tony@atomide.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: linux@arm.linux.org.uk, yongjun_wei@trendmicro.com.cn,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()
Date: Wed, 8 May 2013 16:10:34 -0700 [thread overview]
Message-ID: <20130508231034.GP32546@atomide.com> (raw)
In-Reply-To: <CAPgLHd-5cRFtN-rF8c5Jvg9cqE3jvxuOa6KaDgcoYHPM4DhbMQ@mail.gmail.com>
* Wei Yongjun <weiyj.lk@gmail.com> [130426 01:36]:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing iounmap() before return from omap1_system_dma_init()
> in the error handling case.
> Also removed platform_device_del() on add resources error case which
> cause dup device delete.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> no compile test.
Seems to work, applying into omap-for-v3.10/fixes thanks.
Tony
> arch/arm/mach-omap1/dma.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
> index 1a4e887..68ab858 100644
> --- a/arch/arm/mach-omap1/dma.c
> +++ b/arch/arm/mach-omap1/dma.c
> @@ -301,7 +301,7 @@ static int __init omap1_system_dma_init(void)
> if (ret) {
> dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
> __func__, pdev->name, pdev->id);
> - goto exit_device_put;
> + goto exit_iounmap;
> }
>
> p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
> @@ -309,7 +309,7 @@ static int __init omap1_system_dma_init(void)
> dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n",
> __func__, pdev->name);
> ret = -ENOMEM;
> - goto exit_device_del;
> + goto exit_iounmap;
> }
>
> d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
> @@ -402,8 +402,8 @@ exit_release_d:
> kfree(d);
> exit_release_p:
> kfree(p);
> -exit_device_del:
> - platform_device_del(pdev);
> +exit_iounmap:
> + iounmap(dma_base);
> exit_device_put:
> platform_device_put(pdev);
>
>
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()
Date: Wed, 8 May 2013 16:10:34 -0700 [thread overview]
Message-ID: <20130508231034.GP32546@atomide.com> (raw)
In-Reply-To: <CAPgLHd-5cRFtN-rF8c5Jvg9cqE3jvxuOa6KaDgcoYHPM4DhbMQ@mail.gmail.com>
* Wei Yongjun <weiyj.lk@gmail.com> [130426 01:36]:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing iounmap() before return from omap1_system_dma_init()
> in the error handling case.
> Also removed platform_device_del() on add resources error case which
> cause dup device delete.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> no compile test.
Seems to work, applying into omap-for-v3.10/fixes thanks.
Tony
> arch/arm/mach-omap1/dma.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
> index 1a4e887..68ab858 100644
> --- a/arch/arm/mach-omap1/dma.c
> +++ b/arch/arm/mach-omap1/dma.c
> @@ -301,7 +301,7 @@ static int __init omap1_system_dma_init(void)
> if (ret) {
> dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
> __func__, pdev->name, pdev->id);
> - goto exit_device_put;
> + goto exit_iounmap;
> }
>
> p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
> @@ -309,7 +309,7 @@ static int __init omap1_system_dma_init(void)
> dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n",
> __func__, pdev->name);
> ret = -ENOMEM;
> - goto exit_device_del;
> + goto exit_iounmap;
> }
>
> d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
> @@ -402,8 +402,8 @@ exit_release_d:
> kfree(d);
> exit_release_p:
> kfree(p);
> -exit_device_del:
> - platform_device_del(pdev);
> +exit_iounmap:
> + iounmap(dma_base);
> exit_device_put:
> platform_device_put(pdev);
>
>
next prev parent reply other threads:[~2013-05-08 23:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 8:31 [PATCH] ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init() Wei Yongjun
2013-04-26 8:31 ` Wei Yongjun
2013-05-08 23:10 ` Tony Lindgren [this message]
2013-05-08 23:10 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130508231034.GP32546@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.