From: Thor Thayer <thor.thayer@linux.intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
bp@alien8.de, mchehab@kernel.org
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] EDAC, altera: Fix an error handling path in 'altr_edac_device_probe()'
Date: Thu, 17 Aug 2017 15:30:23 +0000 [thread overview]
Message-ID: <ea7375cc-5b25-8026-6df1-5c866e4013e8@linux.intel.com> (raw)
In-Reply-To: <20170816050506.14541-1-christophe.jaillet@wanadoo.fr>
On 08/16/2017 12:05 AM, Christophe JAILLET wrote:
> 'res' is known to be 0 at this point.
> If 'devm_ioremap()' fails, returns -ENOMEM instead of 0 which means
> success.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/edac/altera_edac.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> index fa2e5db56d24..346c4987b284 100644
> --- a/drivers/edac/altera_edac.c
> +++ b/drivers/edac/altera_edac.c
> @@ -747,8 +747,10 @@ static int altr_edac_device_probe(struct platform_device *pdev)
> drvdata->edac_dev_name = ecc_name;
>
> drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
> - if (!drvdata->base)
> + if (!drvdata->base) {
> + res = -ENOMEM;
> goto fail1;
> + }
>
> /* Get driver specific data for this EDAC device */
> drvdata->data = of_match_node(altr_edac_device_of_match, np)->data;
>
Thank you for this patch!
Acked-by: Thor Thayer <thor.thayer@linux.intel.com>
next prev parent reply other threads:[~2017-08-17 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 5:05 [PATCH] EDAC, altera: Fix an error handling path in 'altr_edac_device_probe()' Christophe JAILLET
2017-08-17 15:30 ` Thor Thayer [this message]
2017-08-18 16:24 ` Borislav Petkov
2018-06-10 15:34 ` [PATCH] EDAC, altera: Fix an error handling path in 'mv64x60_pci_err_probe()' Christophe JAILLET
2018-06-10 16:01 ` Christophe Jaillet
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=ea7375cc-5b25-8026-6df1-5c866e4013e8@linux.intel.com \
--to=thor.thayer@linux.intel.com \
--cc=bp@alien8.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox