From: lautriv <lautriv@coldplug.net>
To: Fabio Estevam <festevam@gmail.com>, Alexey Charkov <alchark@gmail.com>
Cc: Tony Prisk <linux@prisktech.co.nz>, Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: wmt-sdmmc: fix unmatched release_mem_region
Date: Sun, 09 Nov 2014 23:18:09 +0100 [thread overview]
Message-ID: <545FE821.5060107@coldplug.net> (raw)
In-Reply-To: <CAOMZO5C+O4h=f=vtLTdBZktnfVWzfeLjOQG-oecxh_c9u-QMqA@mail.gmail.com>
On 11/09/2014 10:55 PM, Fabio Estevam wrote:
> On Sun, Nov 9, 2014 at 7:12 PM, Alexey Charkov <alchark@gmail.com> wrote:
>
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>> + ret = -ENODEV;
>> + goto fail1;
> You could save this NULL check...
>
>> + }
>> mmc = mmc_alloc_host(sizeof(struct wmt_mci_priv), &pdev->dev);
>> if (!mmc) {
>> dev_err(&pdev->dev, "Failed to allocate mmc_host\n");
>> @@ -813,7 +819,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
>> if (of_get_property(np, "cd-inverted", NULL))
>> priv->cd_inverted = 1;
>>
>> - priv->sdmmc_base = of_iomap(np, 0);
> If you move ' res = platform_get_resource' right here as
> devm_ioremap_resource() already does the NULL check.
>
>> + priv->sdmmc_base = devm_ioremap_resource(&pdev->dev, res);
>> if (!priv->sdmmc_base) {
>> dev_err(&pdev->dev, "Failed to map IO space\n");
>> ret = -ENOMEM;
This was the original intention but it would fall between the failX
jumps, i discussed that with Alexey and we decided to change it with the
cleanup to hold this patch small.
WARNING: multiple messages have this Message-ID (diff)
From: lautriv@coldplug.net (lautriv)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: wmt-sdmmc: fix unmatched release_mem_region
Date: Sun, 09 Nov 2014 23:18:09 +0100 [thread overview]
Message-ID: <545FE821.5060107@coldplug.net> (raw)
In-Reply-To: <CAOMZO5C+O4h=f=vtLTdBZktnfVWzfeLjOQG-oecxh_c9u-QMqA@mail.gmail.com>
On 11/09/2014 10:55 PM, Fabio Estevam wrote:
> On Sun, Nov 9, 2014 at 7:12 PM, Alexey Charkov <alchark@gmail.com> wrote:
>
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>> + ret = -ENODEV;
>> + goto fail1;
> You could save this NULL check...
>
>> + }
>> mmc = mmc_alloc_host(sizeof(struct wmt_mci_priv), &pdev->dev);
>> if (!mmc) {
>> dev_err(&pdev->dev, "Failed to allocate mmc_host\n");
>> @@ -813,7 +819,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
>> if (of_get_property(np, "cd-inverted", NULL))
>> priv->cd_inverted = 1;
>>
>> - priv->sdmmc_base = of_iomap(np, 0);
> If you move ' res = platform_get_resource' right here as
> devm_ioremap_resource() already does the NULL check.
>
>> + priv->sdmmc_base = devm_ioremap_resource(&pdev->dev, res);
>> if (!priv->sdmmc_base) {
>> dev_err(&pdev->dev, "Failed to map IO space\n");
>> ret = -ENOMEM;
This was the original intention but it would fall between the failX
jumps, i discussed that with Alexey and we decided to change it with the
cleanup to hold this patch small.
next prev parent reply other threads:[~2014-11-09 22:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 21:12 [PATCH] mmc: wmt-sdmmc: fix unmatched release_mem_region Alexey Charkov
2014-11-09 21:12 ` Alexey Charkov
2014-11-09 21:55 ` Fabio Estevam
2014-11-09 21:55 ` Fabio Estevam
2014-11-09 22:18 ` lautriv [this message]
2014-11-09 22:18 ` lautriv
2014-11-10 5:15 ` Alexey Charkov
2014-11-10 5:15 ` Alexey Charkov
2014-11-10 20:17 ` lautriv
2014-11-10 20:17 ` lautriv
2014-11-20 14:45 ` lautriv
2014-11-20 14:45 ` lautriv
2014-11-24 8:34 ` Ulf Hansson
2014-11-24 8:34 ` Ulf Hansson
2014-11-25 22:34 ` lautriv
2014-11-25 22:34 ` lautriv
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=545FE821.5060107@coldplug.net \
--to=lautriv@coldplug.net \
--cc=alchark@gmail.com \
--cc=chris@printf.net \
--cc=festevam@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=ulf.hansson@linaro.org \
/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.