From: Borislav Petkov <bp@alien8.de>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Cc: tony.luck@intel.com, rric@kernel.org, michal.simek@xilinx.com,
james.morse@arm.com, mchehab@kernel.org,
linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org
Subject: Re: [PATCH] EDAC/synopsys: Fix wrong return value of mc_probe()
Date: Wed, 18 Nov 2020 19:36:58 +0100 [thread overview]
Message-ID: <20201118183658.GM7472@zn.tnic> (raw)
In-Reply-To: <20201116135810.3130845-1-zhangxiaoxu5@huawei.com>
On Mon, Nov 16, 2020 at 08:58:10AM -0500, Zhang Xiaoxu wrote:
> If create the inject sysfs file failed, we should return
> the error, rather than 0. Otherwise, there maybe error
> pointer access.
>
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
> ---
> drivers/edac/synopsys_edac.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
> index 12211dc040e8..7e7146b22c16 100644
> --- a/drivers/edac/synopsys_edac.c
> +++ b/drivers/edac/synopsys_edac.c
> @@ -1344,7 +1344,8 @@ static int mc_probe(struct platform_device *pdev)
>
> #ifdef CONFIG_EDAC_DEBUG
> if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) {
> - if (edac_create_sysfs_attributes(mci)) {
> + rc = edac_create_sysfs_attributes(mci);
> + if (rc) {
> edac_printk(KERN_ERR, EDAC_MC,
> "Failed to create sysfs entries\n");
> goto free_edac_mc;
> --
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-11-18 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 13:58 [PATCH] EDAC/synopsys: Fix wrong return value of mc_probe() Zhang Xiaoxu
2020-11-18 13:57 ` Michal Simek
2020-11-18 18:36 ` Borislav Petkov [this message]
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=20201118183658.GM7472@zn.tnic \
--to=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=rric@kernel.org \
--cc=tony.luck@intel.com \
--cc=zhangxiaoxu5@huawei.com \
/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